MCPcopy Create free account
hub / github.com/BVLC/caffe / Net_Init_Load

Function Net_Init_Load

python/caffe/_caffe.cpp:137–151  ·  view source on GitHub ↗

Legacy Net construct-and-load convenience constructor

Source from the content-addressed store, hash-verified

135
136// Legacy Net construct-and-load convenience constructor
137shared_ptr<Net<Dtype> > Net_Init_Load(
138 string param_file, string pretrained_param_file, int phase) {
139 LOG(WARNING) << "DEPRECATION WARNING - deprecated use of Python interface";
140 LOG(WARNING) << "Use this instead (with the named \"weights\""
141 << " parameter):";
142 LOG(WARNING) << "Net('" << param_file << "', " << phase
143 << ", weights='" << pretrained_param_file << "')";
144 CheckFile(param_file);
145 CheckFile(pretrained_param_file);
146
147 shared_ptr<Net<Dtype> > net(new Net<Dtype>(param_file,
148 static_cast<Phase>(phase)));
149 net->CopyTrainedLayersFrom(pretrained_param_file);
150 return net;
151}
152
153void Net_Save(const Net<Dtype>& net, string filename) {
154 NetParameter net_param;

Callers

nothing calls this directly

Calls 2

CheckFileFunction · 0.85
CopyTrainedLayersFromMethod · 0.80

Tested by

no test coverage detected