|TensorFlow 2 version||View source on GitHub|
Computes the elementwise value of a polynomial.
tf.math.polyval( coeffs, x, name=None )
x is a tensor and
coeffs is a list n + 1 tensors, this function returns
the value of the n-th order polynomial
p(x) = coeffs[n-1] + coeffs[n-2] * x + ... + coeffs * x**(n-1)
evaluated using Horner's method, i.e.
p(x) = coeffs[n-1] + x * (coeffs[n-2] + ... + x * (coeffs + x * coeffs))
coeffs: A list of
Tensorrepresenting the coefficients of the polynomial.
Tensorrepresenting the variable of the polynomial.
name: A name for the operation (optional).
tensor of the shape as the expression p(x) with usual broadcasting rules
for element-wise addition and multiplication applied.
Equivalent to numpy.polyval.