Skip to content

Commit 3bbbd2a

Browse files
committed
initialize iter to zero in solver
Even though iter may not be meaningful if we are about to restore, it can be useful before calling Solve or Step for the first time.
1 parent b1c078a commit 3bbbd2a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/caffe/solver.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Solver<Dtype>::Solver(const string& param_file)
3030
template <typename Dtype>
3131
void Solver<Dtype>::Init(const SolverParameter& param) {
3232
initialized_ = false;
33+
iter_ = 0;
3334
LOG(INFO) << "Initializing solver from parameters: " << std::endl
3435
<< param.DebugString();
3536
param_ = param;

0 commit comments

Comments
 (0)