зеркало из https://github.com/microsoft/caffe.git
Do snapshot after computing loss and test accuracy
This commit is contained in:
Родитель
ed4e2009cf
Коммит
313cc84932
|
@ -58,10 +58,6 @@ void Solver<Dtype>::Solve(const char* resume_file) {
|
|||
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;
|
||||
}
|
||||
|
@ -71,6 +67,10 @@ void Solver<Dtype>::Solve(const char* resume_file) {
|
|||
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_--;
|
||||
|
|
Загрузка…
Ссылка в новой задаче