@oneflow_export('gen_tensor_buffer')
@stable_api
def gen_tensor_buffer(shape: Sequence[int], shape_list: Sequence[Sequence[int]], value_list: Sequence[float], data_type: Optional[flow.dtype]=flow.float32, dynamic_out: Optional[bool]=False, name: Optional[str]=None) -> oneflow._oneflow_internal.BlobDesc:
    'This operator generates a tensor buffer blob.\n\n    Args:\n        shape (Sequence[int]): shape of output blob\n        shape_list ( Sequence[Sequence[int]]): shapes for tensor buffer in output blob\n        value_list (Sequence[float]): values for tensor buffer in output blob\n        data_type (Optional[flow.dtype]): data type for tensor buffer in output blob\n        dynamic_out (Optional[bool]): if output is a dynamic blob\n        name (Optional[str]): The name for the operation. Defaults to None.\n\n    Returns:\n        BlobDesc: The result Blob.\n\n    For example:\n\n    .. code-block:: python\n\n        import oneflow.compatible.single_client as flow\n\n        @flow.global_function(function_config=func_config)\n        def GenTensorBufferJob():\n            with flow.scope.placement("cpu", "0:0"):\n                x = flow.gen_tensor_buffer([(2,)], [(2, 1), (1, 2)], [0.0, 1.0])\n                y = flow.tensor_buffer_to_list_of_tensors(x, (100, 100), flow.float, True)\n                return y\n\n        # y_0.shape (2, 1), y_1.shape (1. 2)\n\n    '
    return flow.user_op_builder((name if (name is not None) else id_util.UniqueStr('GenTensorBuffer_'))).Op('gen_tensor_buffer').Output('out').Attr('shape', shape).Attr('shape_list', shape_list).Attr('value_list', value_list).Attr('data_type', data_type).Attr('dynamic_out', dynamic_out).Build().InferAndTryRun().RemoteBlobList()[0]
This operator generates a tensor buffer blob.

Args:
    shape (Sequence[int]): shape of output blob
    shape_list ( Sequence[Sequence[int]]): shapes for tensor buffer in output blob
    value_list (Sequence[float]): values for tensor buffer in output blob
    data_type (Optional[flow.dtype]): data type for tensor buffer in output blob
    dynamic_out (Optional[bool]): if output is a dynamic blob
    name (Optional[str]): The name for the operation. Defaults to None.

Returns:
    BlobDesc: The result Blob.

For example:

.. code-block:: python

    import oneflow.compatible.single_client as flow

    @flow.global_function(function_config=func_config)
    def GenTensorBufferJob():
        with flow.scope.placement("cpu", "0:0"):
            x = flow.gen_tensor_buffer([(2,)], [(2, 1), (1, 2)], [0.0, 1.0])
            y = flow.tensor_buffer_to_list_of_tensors(x, (100, 100), flow.float, True)
            return y

    # y_0.shape (2, 1), y_1.shape (1. 2)
@oneflow_export('gen_tensor_buffer')
@stable_api
def gen_tensor_buffer(shape: Sequence[int], shape_list: Sequence[Sequence[int]], value_list: Sequence[float], data_type: Optional[flow.dtype]=flow.float32, dynamic_out: Optional[bool]=False, name: Optional[str]=None) -> oneflow._oneflow_internal.BlobDesc:
    'This operator generates a tensor buffer blob.\n\n    Args:\n        shape (Sequence[int]): shape of output blob\n        shape_list ( Sequence[Sequence[int]]): shapes for tensor buffer in output blob\n        value_list (Sequence[float]): values for tensor buffer in output blob\n        data_type (Optional[flow.dtype]): data type for tensor buffer in output blob\n        dynamic_out (Optional[bool]): if output is a dynamic blob\n        name (Optional[str]): The name for the operation. Defaults to None.\n\n    Returns:\n        BlobDesc: The result Blob.\n\n    For example:\n\n    .. code-block:: python\n\n        import oneflow.compatible.single_client as flow\n\n        @flow.global_function(function_config=func_config)\n        def GenTensorBufferJob():\n            with flow.scope.placement("cpu", "0:0"):\n                x = flow.gen_tensor_buffer([(2,)], [(2, 1), (1, 2)], [0.0, 1.0])\n                y = flow.tensor_buffer_to_list_of_tensors(x, (100, 100), flow.float, True)\n                return y\n\n        # y_0.shape (2, 1), y_1.shape (1. 2)\n\n    '
    return flow.user_op_builder((name if (name is not None) else id_util.UniqueStr('GenTensorBuffer_'))).Op('gen_tensor_buffer').Output('out').Attr('shape', shape).Attr('shape_list', shape_list).Attr('value_list', value_list).Attr('data_type', data_type).Attr('dynamic_out', dynamic_out).Build().InferAndTryRun().RemoteBlobList()[0]