Legacy Net construct-and-load convenience constructor
| 135 | |
| 136 | // Legacy Net construct-and-load convenience constructor |
| 137 | shared_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 | |
| 153 | void Net_Save(const Net<Dtype>& net, string filename) { |
| 154 | NetParameter net_param; |
nothing calls this directly
no test coverage detected