load_ANN

Loads an object saved with torch.save() or tf.train.Saver() from a file.

Syntax

Description

Loads the parameters of a well-trained network from a file on the disk. net is an instance of the network model that users build. path specifies the dictionary where the file is located, relatively or absolutely.


More parameters about how to load the network are specified by kwargs. For example, source indicate the framework in which the network is build, PyTorch or TensorFlow. And map_location is needed to specify how to remap storage locations in PyTorch.

Examples

Input Arguments

net —— An instance of the network model that users build.


path —— The dictionary where the file is located, relatively or absolutely.


source —— The framework in which the network is build, PyTorch or TensorFlow, specified as pytorch (default) or tensorflow.


map_location —— Specify how to remap storage locations in PyTorch.

References

[1] https://pytorch.org/docs/stable/generated/torch.load.html