Translate the signal effect the user specified on the command-line to the corresponding enumeration.
| 163 | // Translate the signal effect the user specified on the command-line to the |
| 164 | // corresponding enumeration. |
| 165 | caffe::SolverAction::Enum GetRequestedAction( |
| 166 | const std::string& flag_value) { |
| 167 | if (flag_value == "stop") { |
| 168 | return caffe::SolverAction::STOP; |
| 169 | } |
| 170 | if (flag_value == "snapshot") { |
| 171 | return caffe::SolverAction::SNAPSHOT; |
| 172 | } |
| 173 | if (flag_value == "none") { |
| 174 | return caffe::SolverAction::NONE; |
| 175 | } |
| 176 | LOG(FATAL) << "Invalid signal effect \""<< flag_value << "\" was specified"; |
| 177 | } |
| 178 | |
| 179 | // Train / Finetune a model. |
| 180 | int train() { |