MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / CopyLayers

Function CopyLayers

rtpose_wrapper/tools/caffe.cpp:151–161  ·  view source on GitHub ↗

Load the weights from the specified caffemodel(s) into the train and test nets.

Source from the content-addressed store, hash-verified

149// Load the weights from the specified caffemodel(s) into the train and
150// test nets.
151void CopyLayers(caffe::Solver<float>* solver, const std::string& model_list) {
152 std::vector<std::string> model_names;
153 boost::split(model_names, model_list, boost::is_any_of(",") );
154 for (int i = 0; i < model_names.size(); ++i) {
155 LOG(INFO) << "Finetuning from " << model_names[i];
156 solver->net()->CopyTrainedLayersFrom(model_names[i]);
157 for (int j = 0; j < solver->test_nets().size(); ++j) {
158 solver->test_nets()[j]->CopyTrainedLayersFrom(model_names[i]);
159 }
160 }
161}
162
163// Translate the signal effect the user specified on the command-line to the
164// corresponding enumeration.

Callers 1

trainFunction · 0.85

Calls 3

CopyTrainedLayersFromMethod · 0.80
netMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected