parameters: (op)
docstring: Shape function for UnsortedSegmentSum.
docstring_summary: Shape function for UnsortedSegmentSum.
docstring_tokens: Shape function for UnsortedSegmentSum .
function: def _UnsortedSegmentSumShape(op):
    """Shape function for UnsortedSegmentSum."""
    data_shape = op.inputs[0].get_shape()
    segment_ids_shape = op.inputs[1].get_shape()
    mid = segment_ids_shape.ndims
    if mid is None:
      return [tensor_shape.unknown_shape()]
    else:
      num_segments = tensor_util.constant_value(op.inputs[2])
      return [tensor_shape.TensorShape([num_segments]).concatenate(
          data_shape[mid:])]
function_tokens: def _UnsortedSegmentSumShape ( op ) : data_shape = op . inputs [ 0 ] . get_shape ( ) segment_ids_shape = op . inputs [ 1 ] . get_shape ( ) mid = segment_ids_shape . ndims if mid is None : return [ tensor_shape . unknown_shape ( ) ] else : num_segments = tensor_util . constant_value ( op . inputs [ 2 ] ) return [ tensor_shape . TensorShape ( [ num_segments ] ) . concatenate ( data_shape [ mid : ] ) ]