@oneflow_export('tensor_buffer_to_list_of_tensors')
@stable_api
def tensor_buffer_to_list_of_tensors(x: oneflow._oneflow_internal.BlobDesc, out_shape: Sequence[int], out_dtype: flow.dtype, dynamic_out: Optional[bool]=False, name: Optional[str]=None) -> List[oneflow._oneflow_internal.BlobDesc]:
    'This operator converts the Blob of TensorBuffer to list of Tensors. Every element in x will be converted\n    to a Tensor and output will be flatten to a list.\n\n    Args:\n        x (BlobDesc): Input `Blob`, data type must be tensor buffer.\n        out_shape (Sequence[int]): max shape for a tensor buffer in x\n        out_dtype (flow.dtype,): output data type\n        dynamic_out (Optional[bool]): if output is dynamic blob. Default to False.\n        name (Optional[str]): The name for the operation. Default to None.\n\n    Returns:\n        List[BlobDesc]: result blobs\n\n    For example:\n\n    .. code-block:: python\n\n        # the same with `gen_tensor_buffer` op\n\n    '
    return flow.user_op_builder((name if (name is not None) else id_util.UniqueStr('TensorBufferToListOfTensors_'))).Op('tensor_buffer_to_list_of_tensors').Input('in', [x]).Output('out', functools.reduce(operator.mul, x.shape, 1)).Attr('out_dtype', out_dtype).Attr('out_shape', out_shape).Attr('dynamic_out', dynamic_out).Build().InferAndTryRun().RemoteBlobList()
This operator converts the Blob of TensorBuffer to list of Tensors. Every element in x will be converted
to a Tensor and output will be flatten to a list.

Args:
    x (BlobDesc): Input `Blob`, data type must be tensor buffer.
    out_shape (Sequence[int]): max shape for a tensor buffer in x
    out_dtype (flow.dtype,): output data type
    dynamic_out (Optional[bool]): if output is dynamic blob. Default to False.
    name (Optional[str]): The name for the operation. Default to None.

Returns:
    List[BlobDesc]: result blobs

For example:

.. code-block:: python

    # the same with `gen_tensor_buffer` op
@oneflow_export('tensor_buffer_to_list_of_tensors')
@stable_api
def tensor_buffer_to_list_of_tensors(x: oneflow._oneflow_internal.BlobDesc, out_shape: Sequence[int], out_dtype: flow.dtype, dynamic_out: Optional[bool]=False, name: Optional[str]=None) -> List[oneflow._oneflow_internal.BlobDesc]:
    'This operator converts the Blob of TensorBuffer to list of Tensors. Every element in x will be converted\n    to a Tensor and output will be flatten to a list.\n\n    Args:\n        x (BlobDesc): Input `Blob`, data type must be tensor buffer.\n        out_shape (Sequence[int]): max shape for a tensor buffer in x\n        out_dtype (flow.dtype,): output data type\n        dynamic_out (Optional[bool]): if output is dynamic blob. Default to False.\n        name (Optional[str]): The name for the operation. Default to None.\n\n    Returns:\n        List[BlobDesc]: result blobs\n\n    For example:\n\n    .. code-block:: python\n\n        # the same with `gen_tensor_buffer` op\n\n    '
    return flow.user_op_builder((name if (name is not None) else id_util.UniqueStr('TensorBufferToListOfTensors_'))).Op('tensor_buffer_to_list_of_tensors').Input('in', [x]).Output('out', functools.reduce(operator.mul, x.shape, 1)).Attr('out_dtype', out_dtype).Attr('out_shape', out_shape).Attr('dynamic_out', dynamic_out).Build().InferAndTryRun().RemoteBlobList()