summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/caffe/solver.hpp14
-rw-r--r--src/caffe/solver.cpp16
2 files changed, 15 insertions, 15 deletions
diff --git a/include/caffe/solver.hpp b/include/caffe/solver.hpp
index 8d52785..2ecf539 100644
--- a/include/caffe/solver.hpp
+++ b/include/caffe/solver.hpp
@@ -283,19 +283,19 @@ Solver<Dtype>* GetSolver(const SolverParameter& param) {
switch (type) {
case SolverParameter_SolverType_SGD:
- return new SGDSolver<Dtype>(param);
+ return new SGDSolver<Dtype>(param);
case SolverParameter_SolverType_NESTEROV:
- return new NesterovSolver<Dtype>(param);
+ return new NesterovSolver<Dtype>(param);
case SolverParameter_SolverType_ADAGRAD:
- return new AdaGradSolver<Dtype>(param);
+ return new AdaGradSolver<Dtype>(param);
case SolverParameter_SolverType_RMSPROP:
- return new RMSPropSolver<Dtype>(param);
+ return new RMSPropSolver<Dtype>(param);
case SolverParameter_SolverType_ADADELTA:
- return new AdaDeltaSolver<Dtype>(param);
+ return new AdaDeltaSolver<Dtype>(param);
case SolverParameter_SolverType_ADAM:
- return new AdamSolver<Dtype>(param);
+ return new AdamSolver<Dtype>(param);
default:
- LOG(FATAL) << "Unknown SolverType: " << type;
+ LOG(FATAL) << "Unknown SolverType: " << type;
}
return (Solver<Dtype>*) NULL;
}
diff --git a/src/caffe/solver.cpp b/src/caffe/solver.cpp
index 3574ce7..12c13dd 100644
--- a/src/caffe/solver.cpp
+++ b/src/caffe/solver.cpp
@@ -422,14 +422,14 @@ void Solver<Dtype>::Snapshot() {
CHECK(Caffe::root_solver());
string model_filename;
switch (param_.snapshot_format()) {
- case caffe::SolverParameter_SnapshotFormat_BINARYPROTO:
- model_filename = SnapshotToBinaryProto();
- break;
- case caffe::SolverParameter_SnapshotFormat_HDF5:
- model_filename = SnapshotToHDF5();
- break;
- default:
- LOG(FATAL) << "Unsupported snapshot format.";
+ case caffe::SolverParameter_SnapshotFormat_BINARYPROTO:
+ model_filename = SnapshotToBinaryProto();
+ break;
+ case caffe::SolverParameter_SnapshotFormat_HDF5:
+ model_filename = SnapshotToHDF5();
+ break;
+ default:
+ LOG(FATAL) << "Unsupported snapshot format.";
}
SnapshotSolverState(model_filename);