parameters: (op)
docstring: Shape function for the Split op.
docstring_summary: Shape function for the Split op.
docstring_tokens: Shape function for the Split op .
function: def _SplitShape(op):
    """Shape function for the Split op."""
    split_dim = tensor_util.constant_value(op.inputs[0])
    num_split = len(op.outputs)
    input_shape = op.inputs[1].get_shape()
    if split_dim is None:
      return [tensor_shape.unknown_shape(ndims=input_shape.ndims)] * num_split
    else:
      split_dim = int(split_dim)
      input_shape = input_shape.with_rank_at_least(split_dim + 1)
      if not (input_shape[split_dim] % num_split).is_compatible_with(0):
        raise ValueError(
            "Number of ways to split should evenly divide the split "
            "dimension but got split_dim %d (size = %d) and num_split %d" %
            (split_dim, input_shape[split_dim].value, num_split))
      prefix = input_shape[:split_dim]
      size_in_split_dim = input_shape[split_dim] // num_split
      suffix = input_shape[split_dim + 1:]
      output_shape = prefix.concatenate(size_in_split_dim).concatenate(suffix)
      return [output_shape] * num_split
function_tokens: def _SplitShape ( op ) : split_dim = tensor_util . constant_value ( op . inputs [ 0 ] ) num_split = len ( op . outputs ) input_shape = op . inputs [ 1 ] . get_shape ( ) if split_dim is None : return [ tensor_shape . unknown_shape ( ndims = input_shape . ndims ) ] * num_split else : split_dim = int ( split_dim ) input_shape = input_shape . with_rank_at_least ( split_dim + 1 ) if not ( input_shape [ split_dim ] % num_split ) . is_compatible_with ( 0 ) : raise ValueError ( "Number of ways to split should evenly divide the split " "dimension but got split_dim %d (size = %d) and num_split %d" % ( split_dim , input_shape [ split_dim ] . value , num_split ) ) prefix = input_shape [ : split_dim ] size_in_split_dim = input_shape [ split_dim ] // num_split suffix = input_shape [ split_dim + 1 : ] output_shape = prefix . concatenate ( size_in_split_dim ) . concatenate ( suffix ) return [ output_shape ] * num_split