| 461 | |
| 462 | template <typename Dtype> |
| 463 | void Solver<Dtype>::Restore(const char* state_file) { |
| 464 | string state_filename(state_file); |
| 465 | if (state_filename.size() >= 3 && |
| 466 | state_filename.compare(state_filename.size() - 3, 3, ".h5") == 0) { |
| 467 | RestoreSolverStateFromHDF5(state_filename); |
| 468 | } else { |
| 469 | RestoreSolverStateFromBinaryProto(state_filename); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | template <typename Dtype> |
| 474 | void Solver<Dtype>::UpdateSmoothedLoss(Dtype loss, int start_iter, |