load¶
-
paddle.fluid.layers.io.
load
( out, file_path, load_as_fp16=None ) [source] -
Load operator will load a LoDTensor / SelectedRows variable from disk file.
- Parameters
-
out (Variable) – The LoDTensor / SelectedRows need to be loaded..
file_path (STRING) – Variable will be loaded from “file_path”.
load_as_fp16 (BOOLEAN) – If true, the tensor will be first loaded and then converted to float16 data type. Otherwise, the tensor will be directly loaded without data type conversion. Default is false..
- Returns
-
None
Examples
import paddle.fluid as fluid tmp_tensor = fluid.layers.create_tensor(dtype='float32') fluid.layers.load(tmp_tensor, "./tmp_tensor.bin")