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

Function get_phase_from_flags

tools/caffe.cpp:112–121  ·  view source on GitHub ↗

Parse phase from flags

Source from the content-addressed store, hash-verified

110
111// Parse phase from flags
112caffe::Phase get_phase_from_flags(caffe::Phase default_value) {
113 if (FLAGS_phase == "")
114 return default_value;
115 if (FLAGS_phase == "TRAIN")
116 return caffe::TRAIN;
117 if (FLAGS_phase == "TEST")
118 return caffe::TEST;
119 LOG(FATAL) << "phase must be \"TRAIN\" or \"TEST\"";
120 return caffe::TRAIN; // Avoid warning
121}
122
123// Parse stages from flags
124vector<string> get_stages_from_flags() {

Callers 1

timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected