class_docstr: Tests correctness of the Y = g(X) = exp(X) / sum(exp(X)) transformation.
class_docstr_tok: ["Tests","correctness","of","the","Y","=","g","(","X",")","=","exp","(","X",")","\/","sum","(","exp","(","X",")",")","transformation","."]
code: def testAssertsValidArgToInverse(self):
      softmax = softmax_centered.SoftmaxCentered(validate_args=True)
      with self.assertRaisesOpError("must sum to `1`"):
          self.evaluate(softmax.inverse([0.03, 0.7, 0.4]))
  
      with self.assertRaisesOpError(
          "must be less than or equal to `1`|must sum to `1`"
      ):
          self.evaluate(softmax.inverse([0.06, 0.4, 1.02]))
  
      with self.assertRaisesOpError("must be non-negative"):
          self.evaluate(softmax.inverse([0.4, 0.5, 0.3, -0.2]))
  
file_path: probability/tensorflow_probability/python/bijectors/softmax_centered_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import softmax_centered
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the SoftmaxCenteredBijectorTest obj's underlying member method code with example usage: obj.testAssertsValidArgToInverse() without return types