MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle-Lite / LoadParam

Function LoadParam

lite/model_parser/model_parser.cc:70–74  ·  view source on GitHub ↗

Load directly to CPU, and latter transfer to other devices.

Source from the content-addressed store, hash-verified

68
69// Load directly to CPU, and latter transfer to other devices.
70void LoadParam(const std::string &path, Variable *out) {
71 model_parser::BinaryFileReader reader(path);
72 model_parser::pb::LoDTensorDeserializer loader;
73 LoadLoDTensor(&loader, &reader, out);
74}
75
76bool IsPersistable(const cpp::VarDesc &var) {
77 if (var.Persistable() && var.GetType() != VarDescAPI::Type::FEED_MINIBATCH &&

Callers 1

TESTFunction · 0.85

Calls 1

LoadLoDTensorFunction · 0.85

Tested by 1

TESTFunction · 0.68