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

Method InitNetFromProtoFileWithState

src/caffe/test/test_net.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 virtual void InitNetFromProtoFileWithState(const string& proto,
34 Phase phase = caffe::TRAIN, const int level = 0,
35 const vector<string>* stages = NULL) {
36 NetParameter param;
37 CHECK(google::protobuf::TextFormat::ParseFromString(proto, &param));
38 string param_file;
39 MakeTempFilename(&param_file);
40 WriteProtoToTextFile(param, param_file);
41 net_.reset(new Net<Dtype>(param_file, phase, level, stages));
42 }
43
44 virtual void CopyNetBlobs(const bool copy_diff,
45 vector<shared_ptr<Blob<Dtype> > >* blobs_copy) {

Callers

nothing calls this directly

Calls 3

MakeTempFilenameFunction · 0.85
WriteProtoToTextFileFunction · 0.50
resetMethod · 0.45

Tested by

no test coverage detected