create_array¶
-
paddle.fluid.layers.
create_array
(dtype)[source] This OP creates an LOD_TENSOR_ARRAY. It is used as the input of array_read and array_write. Also it can be used with While to create RNN network.
- Parameters
dtype (str) – The data type of the elements in the lod_tensor_array. Support data type: float32, float64, int32, int64.
- Returns
The empty lod_tensor_array. The data type of elements in Tensor is
dtype
.- Return type
Variable
Examples
import paddle.fluid as fluid data = fluid.layers.create_array(dtype='float32') # Create a float32 LoDTensorArray.