class_docstr: Test the Polynomial kernel.
class_docstr_tok: ["Test","the","Polynomial","kernel","."]
code: def testValidateArgsNonPositiveAreBad(self):
      with self.assertRaisesOpError(
          "`bias_amplitude` must be non-negative"
      ):
          k = polynomial.Polynomial(
              bias_amplitude=-1.0, validate_args=True
          )
          self.evaluate(k.apply([1.0], [1.0]))
      with self.assertRaisesOpError(
          "`slope_amplitude` must be non-negative"
      ):
          k = polynomial.Polynomial(
              slope_amplitude=-1.0, validate_args=True
          )
          self.evaluate(k.apply([1.0], [1.0]))
      with self.assertRaisesOpError("`exponent` must be positive"):
          k = polynomial.Polynomial(exponent=-1.0, validate_args=True)
          self.evaluate(k.apply([1.0], [1.0]))
  
      with self.assertRaisesOpError(
          "`slope_amplitude` and `bias_amplitude` can not both be zero."
      ):
          k = polynomial.Polynomial(
              bias_amplitude=0.0,
              slope_amplitude=0.0,
              validate_args=True,
          )
          self.evaluate(k.apply([1.0], [1.0]))
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.psd_kernels import polynomial
label_desc: Use image node_id 3 for calling the PolynomialTest obj's underlying member method code with example usage: obj.testValidateArgsNonPositiveAreBad() without return types