ComputeUpdateValue();
net_->Update();
- // Check if we need to do snapshot
- if (param_.snapshot() && iter_ % param_.snapshot() == 0) {
- Snapshot();
- }
if (param_.display() && iter_ % param_.display() == 0) {
LOG(INFO) << "Iteration " << iter_ << ", loss = " << loss;
}
Test();
Caffe::set_phase(Caffe::TRAIN);
}
+ // Check if we need to do snapshot
+ if (param_.snapshot() && iter_ % param_.snapshot() == 0) {
+ Snapshot();
+ }
}
// After the optimization is done, always do a snapshot.
iter_--;