class_docstr: Split a `Tensor` event along an axis into a list of `Tensor`s.
  
  Example Use:
  
  ```python
  split = tfb.Split(
      num_or_size_splits=[4, 1, 3],
      axis=-1
    )
  y = split.forward(tf.zeros([5, 6, 8]))
  ==> [<`Tensor`, shape=(5, 6, 4)>,
       <`Tensor`, shape=(5, 6, 1)>,
       <`Tensor`, shape=(5, 6, 3)>]
  
  # The inverse of `split` concatenates a list of `Tensor`s along `axis`.
  x_ = split.inverse(y)
  x_.shape
  ==> TensorShape([5, 6, 8])
  ```
class_docstr_tok: ["Split","a","`","Tensor","`","event","along","an","axis","into","a","list","of","`","Tensor","`","s",".","Example","Use",":","``","`","python","split","=","tfb.Split","(","num_or_size_splits=","[","4",",","1",",","3","]",",","axis=-1",")","y","=","split.forward","(","tf.zeros","(","[","5",",","6",",","8","]",")",")","==",">","[","<","`","Tensor","`",",","shape=","(","5",",","6",",","4",")",">",",","<","`","Tensor","`",",","shape=","(","5",",","6",",","1",")",">",",","<","`","Tensor","`",",","shape=","(","5",",","6",",","3",")",">","]","#","The","inverse","of","`","split","`","concatenates","a","list","of","`","Tensor","`","s","along","`","axis","`",".","x_","=","split.inverse","(","y",")","x_.shape","==",">","TensorShape","(","[","5",",","6",",","8","]",")","``","`"]
docstr: Shape of a single sample from a single batch as a list of `TensorShape`s.
  
  Same meaning as `forward_event_shape_tensor`. May be only partially defined.
  
  Args:
    input_shape: `TensorShape` indicating event-portion shape passed into
      `forward` function.
  
  Returns:
    forward_event_shape: A list of (possibly unknown) `TensorShape`s
      indicating event-portion shape after applying `forward`. The length of
      the list is equal to the number of splits.
docstr_tok: ["Shape","of","a","single","sample","from","a","single","batch","as","a","list","of","`","TensorShape","`","s",".","Same","meaning","as","`","forward_event_shape_tensor","`",".","May","be","only","partially","defined",".","Args",":","input_shape",":","`","TensorShape","`","indicating","event-portion","shape","passed","into","`","forward","`","function",".","Returns",":","forward_event_shape",":","A","list","of","(","possibly","unknown",")","`","TensorShape","`","s","indicating","event-portion","shape","after","applying","`","forward","`",".","The","length","of","the","list","is","equal","to","the","number","of","splits","."]
code: def _forward_event_shape(self, input_shape):
      """Shape of a single sample from a single batch as a list of `TensorShape`s.
  
      Same meaning as `forward_event_shape_tensor`. May be only partially defined.
  
      Args:
        input_shape: `TensorShape` indicating event-portion shape passed into
          `forward` function.
  
      Returns:
        forward_event_shape: A list of (possibly unknown) `TensorShape`s
          indicating event-portion shape after applying `forward`. The length of
          the list is equal to the number of splits.
      """
      self._validate_input_shape(input_shape)
      if tensorshape_util.rank(input_shape) is None:
          output_shapes = [None] * self.num_splits
      else:
          input_shape = tf.TensorShape(input_shape).as_list()
          axis = tf.get_static_value(self.axis)
  
          if self.split_sizes is None:
              # Calculate `split_sizes` from `input_shape` and `num_splits`, if
              # possible.
              split_size = (
                  None
                  if input_shape[axis] is None
                  else input_shape[axis] // self.num_splits
              )
              split_sizes = [split_size] * self.num_splits
  
          else:
              static_split_sizes = tf.get_static_value(self.split_sizes)
              if static_split_sizes is None:
                  static_split_sizes = [None] * self.num_splits
              split_sizes = tensorshape_util.constant_value_as_shape(
                  static_split_sizes
              ).as_list()
  
              # If there is a single unknown element of `split_sizes` and the input
              # dimension is known, set the unknown element equal to the difference
              # between the input dimension and the sum of the known elements of
              # `split_sizes`.
              if sum(s is None for s in split_sizes) == 1:
                  if (
                      input_shape is not None
                      and input_shape[axis] is not None
                  ):
                      total_size = input_shape[axis]
                      deduced_split_size = total_size - sum(
                          s for s in split_sizes if s is not None
                      )
                      split_sizes = [
                          deduced_split_size if s is None else s
                          for s in split_sizes
                      ]
  
          output_shapes = []
          for split_size in split_sizes:
              output_shape = input_shape[:]
              output_shape[axis] = split_size
              output_shapes.append(output_shape)
  
      return [tf.TensorShape(shape) for shape in output_shapes]
  
imports: import numbers
  import numpy
  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 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
label_desc: Use image node_id 9 for calling the Split obj's underlying member method code with example usage: obj._forward_event_shape(input_shape) and returns: unknown