Python - tensorflow.math.polyval() Last Updated : 11 Jun, 2020 Comments Improve Suggest changes Like Article Like Report TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning neural networks. polyval() is used to compute element wise value of polynomial. Syntax: tensorflow.math.polyval( coeffs, x, name) Parameters: coeffs: It is a list tensor which represents the coefficients of the polynomial.x: It is a tensor which represents the variable of the polynomial.name(optional): It defines the name for the operation. Returns: It returns a tensor. If coeffs is a tensor with n values and x is a tensor then P(x) is nth order polynomial which is defined as: p(x) = coeffs[n-1] + coeffs[n-2] * x + ... + coeffs[0] * x**(n-1) Example 1: Python3 # importing the library import tensorflow as tf # Initializing the input tensor coeffs = [-1, 2, 3] x = tf.constant([7], dtype = tf.int32) # Printing the input tensor print('coeffs: ', coeffs) print('x: ', x) # Calculating Result res = tf.math.polyval(coeffs, x) # Printing the result print('Result: ', res) Output: coeffs: [-1, 2, 3] x: tf.Tensor([7], shape=(1, ), dtype=int32) Result: tf.Tensor([-32], shape=(1, ), dtype=int32) Example 2: Python3 # importing the library import tensorflow as tf # Initializing the input tensor coeffs = [-1, 2, 3] x = tf.constant([7, 2], dtype = tf.int32) # Printing the input tensor print('coeffs: ', coeffs) print('x: ', x) # Calculating Result res = tf.math.polyval(coeffs, x) # Printing the result print('Result: ', res) Output: coeffs: [-1, 2, 3] x: tf.Tensor([7 2], shape=(2, ), dtype=int32) Result: tf.Tensor([-32 3], shape=(2, ), dtype=int32) Comment More infoAdvertise with us Next Article Python - tensorflow.math.polyval() A aman neekhara Follow Improve Article Tags : Machine Learning AI-ML-DS With Python Practice Tags : Machine Learning Similar Reads Python - tensorflow.math.polygamma() TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. polygamma() is used to compute polygamma function. Polygamma function is defined as: This function is defined for only non-negative integer orders i.e. value of a should 2 min read Python - tensorflow.math.pow() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. pow() is used to find element wise x^y. Syntax: tf.math.pow(x, y, name) Parameter: x: It's the input tensor. Allowed dtype for this tensor are float16, float32, float64, 2 min read Python - tensorflow.math.multiply() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. multiply() is used to find element wise x*y. It supports broadcasting. Syntax: tf.math.multiply(x, y, name) Parameter: x: It's the input tensor. Allowed dtype for this t 2 min read Python - tensorflow.math.maximum() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. maximum() is used to find element wise maximum of x and y. Specifically, it returns x > y ? x : y. Syntax: tf.math.maximum(x, y, name) Parameter: x: It's the input te 2 min read Python - tensorflow.math.multiply_no_nan() TensorFlow is open-source python library designed by Google to develop Machine Learning models and deep learning  neural networks. multiply_no_nan() is used to find element wise x*y. It supports broadcasting and returns 0 if y is 0 even if x is infinite or NaN. Syntax: tf.math.multiply_no_nan(x, y, 2 min read Like