| 470 | |
| 471 | template <typename Dtype> |
| 472 | void Solver<Dtype>::Restore(const char* state_file) { |
| 473 | CHECK(Caffe::root_solver()); |
| 474 | string state_filename(state_file); |
| 475 | if (state_filename.size() >= 3 && |
| 476 | state_filename.compare(state_filename.size() - 3, 3, ".h5") == 0) { |
| 477 | RestoreSolverStateFromHDF5(state_filename); |
| 478 | } else { |
| 479 | RestoreSolverStateFromBinaryProto(state_filename); |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | template <typename Dtype> |
| 484 | void Solver<Dtype>::UpdateSmoothedLoss(Dtype loss, int start_iter, |