parameters: (op)
return_statement: return [tensor_shape.TensorShape([None]).concatenate(extra_shape)]
docstring: Shape function for data_flow_ops.dynamic_stitch.
docstring_summary: Shape function for data_flow_ops.dynamic_stitch.
docstring_tokens: Shape function for data_flow_ops . dynamic_stitch .
function: def _DynamicStitchShape(op):
    """Shape function for data_flow_ops.dynamic_stitch."""
    num_partitions = op.get_attr("N")
    indices_shapes = [t.get_shape() for t in op.inputs[0:num_partitions]]
    data_shapes = [t.get_shape() for t in op.inputs[num_partitions:]]
    output_shape = tensor_shape.unknown_shape()
    extra_shape = tensor_shape.TensorShape(None)
    for indices_shape, data_shape in zip(indices_shapes, data_shapes):
      indices_ndims = indices_shape.ndims
      if indices_ndims is not None:
        # Assert that data_shape starts with indices_shape
        indices_shape.merge_with(data_shape[:indices_ndims])
        # The rest belongs to output
        extra_shape = extra_shape.merge_with(data_shape[indices_ndims:])
    return [tensor_shape.TensorShape([None]).concatenate(extra_shape)]
function_tokens: def _DynamicStitchShape ( op ) : num_partitions = op . get_attr ( "N" ) indices_shapes = [ t . get_shape ( ) for t in op . inputs [ 0 : num_partitions ] ] data_shapes = [ t . get_shape ( ) for t in op . inputs [ num_partitions : ] ] output_shape = tensor_shape . unknown_shape ( ) extra_shape = tensor_shape . TensorShape ( None ) for indices_shape , data_shape in zip ( indices_shapes , data_shapes ) : indices_ndims = indices_shape . ndims if indices_ndims is not None : # Assert that data_shape starts with indices_shape indices_shape . merge_with ( data_shape [ : indices_ndims ] ) # The rest belongs to output extra_shape = extra_shape . merge_with ( data_shape [ indices_ndims : ] ) return [ tensor_shape . TensorShape ( [ None ] ) . concatenate ( extra_shape ) ]