class_docstr: Bijector which computes `Y = g(X) = values[X]`.
  
  Example Usage:
  
  ```python
  bijector = CategoricalToDiscrete(map_values=[0.01, 0.1, 1., 10.])
  bijector.forward([1, 3, 2, 1, 0]) = [1., 10., 1., 0.1, 0.01]
  bijector.inverse([1., 10., 1., 0.1, 0.01]) = [1, 3, 2, 1, 0]
  ```
class_docstr_tok: ["Bijector","which","computes","`","Y","=","g","(","X",")","=","values","[","X","]","`",".","Example","Usage",":","``","`","python","bijector","=","CategoricalToDiscrete","(","map_values=","[","0.01",",","0.1",",","1.",",","10",".","]",")","bijector.forward","(","[","1",",","3",",","2",",","1",",","0","]",")","=","[","1.",",","10.",",","1.",",","0.1",",","0.01","]","bijector.inverse","(","[","1.",",","10.",",","1.",",","0.1",",","0.01","]",")","=","[","1",",","3",",","2",",","1",",","0","]","``","`"]
docstr: Instantiates `CategoricalToDiscrete` bijector.
  
  Args:
    map_values: 1D numerical tensor of discrete values to map to, sorted in
      strictly increasing order.
    validate_args: Python `bool` indicating whether arguments should be
      checked for correctness.
    name: Python `str` name given to ops managed by this object.
docstr_tok: ["Instantiates","`","CategoricalToDiscrete","`","bijector",".","Args",":","map_values",":","1D","numerical","tensor","of","discrete","values","to","map","to",",","sorted","in","strictly","increasing","order",".","validate_args",":","Python","`","bool","`","indicating","whether","arguments","should","be","checked","for","correctness",".","name",":","Python","`","str","`","name","given","to","ops","managed","by","this","object","."]
code: def __init__(
      self,
      map_values,
      validate_args=False,
      name="categorical_to_discrete",
  ):
      """Instantiates `CategoricalToDiscrete` bijector.
  
      Args:
        map_values: 1D numerical tensor of discrete values to map to, sorted in
          strictly increasing order.
        validate_args: Python `bool` indicating whether arguments should be
          checked for correctness.
        name: Python `str` name given to ops managed by this object.
      """
      parameters = dict(locals())
      with tf.name_scope(name):
          dtype = dtype_util.common_dtype([map_values], tf.float32)
          self._map_values = tensor_util.convert_nonref_to_tensor(
              map_values, name="map_values", dtype=dtype
          )
          super(CategoricalToDiscrete, self).__init__(
              forward_min_event_ndims=0,
              is_constant_jacobian=True,
              validate_args=validate_args,
              parameters=parameters,
              name=name,
          )
  
file_path: probability/tensorflow_probability/python/bijectors/categorical_to_discrete.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 to create a new CategoricalToDiscrete object from inherited base classes: bijector with example: obj = CategoricalToDiscrete(map_values, validate_args, name)