class_docstr: The `default_event_space_bijector` for `tfd.BatchReshape`.
class_docstr_tok: ["The","`","default_event_space_bijector","`","for","`","tfd.BatchReshape","`","."]
code: def __init__(
      self,
      base_bijector,
      reshape_fn,
      static_inverse_event_shape,
      inverse_event_shape_tensor,
  ):
      parameters = dict(locals())
      self._base_bijector = base_bijector
      self._reshape_fn = reshape_fn
      self._inverse_event_shapes = (
          static_inverse_event_shape,
          inverse_event_shape_tensor,
      )
  
      # Infer min_event_ndims based on the distribution's event shapes.
      # Note that the `inverse_event_shape_tensor` argument to the constructor
      # describes the *output* of `BatchReshape.inverse_event_shape`.
      forward_min_event_ndims = nest.map_structure(
          ps.size, inverse_event_shape_tensor
      )
  
      inverse_min_event_ndims = nest.map_structure(
          ps.size,
          # Prefer static shape-inference if possible.
          base_bijector.forward_event_shape(static_inverse_event_shape)
          if static_inverse_event_shape is not None
          else base_bijector.forward_event_shape_tensor(
              inverse_event_shape_tensor
          ),
      )
  
      super(_NonCompositeTensorBatchReshapeBijector, self).__init__(
          is_constant_jacobian=base_bijector.is_constant_jacobian,
          validate_args=base_bijector.validate_args,
          dtype=base_bijector.dtype,
          inverse_min_event_ndims=inverse_min_event_ndims,
          forward_min_event_ndims=forward_min_event_ndims,
          parameters=parameters,
          name="batch_reshape_bijector",
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new _NonCompositeTensorBatchReshapeBijector object from inherited base classes: bijector_lib with example: obj = _NonCompositeTensorBatchReshapeBijector(base_bijector, reshape_fn, static_inverse_event_shape, inverse_event_shape_tensor)