class_docstr: Bijector that computes `Y = tanh(X)`, therefore `Y in (-1, 1)`.
  
  This can be achieved by an affine transform of the Sigmoid bijector, i.e.,
  it is equivalent to
  ```
  tfb.Chain([tfb.Affine(shift=-1, scale=2.),
             tfb.Sigmoid(),
             tfb.Affine(scale=2.)])
  ```
  
  However, using the `Tanh` bijector directly is slightly faster and more
  numerically stable.
class_docstr_tok: ["Bijector","that","computes","`","Y","=","tanh","(","X",")","`",",","therefore","`","Y","in","(","-1",",","1",")","`",".","This","can","be","achieved","by","an","affine","transform","of","the","Sigmoid","bijector",",","i.e.",",","it","is","equivalent","to","``","`","tfb.Chain","(","[","tfb.Affine","(","shift=-1",",","scale=2",".",")",",","tfb.Sigmoid","(",")",",","tfb.Affine","(","scale=2",".",")","]",")","``","`","However",",","using","the","`","Tanh","`","bijector","directly","is","slightly","faster","and","more","numerically","stable","."]
code: def __init__(self, validate_args=False, name="tanh"):
      parameters = dict(locals())
      super(Tanh, self).__init__(
          forward_min_event_ndims=0,
          validate_args=validate_args,
          parameters=parameters,
          name=name,
      )
  
file_path: agents/tf_agents/distributions/tanh_bijector_stable.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow_probability.python.bijectors import bijector
label_desc: Use image node_id 1 to create a new Tanh object from inherited base classes: bijector with example: obj = Tanh(validate_args, name)