Skip to content

Commit 4c2c197

Browse files
committed
1 parent 27c2537 commit 4c2c197

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

include/caffe/solver.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ class SGDSolver : public Solver<Dtype> {
5050

5151
protected:
5252
virtual void PreSolve();
53-
virtual Dtype GetLearningRate();
53+
Dtype GetLearningRate();
5454
virtual void ComputeUpdateValue();
5555
virtual void SnapshotSolverState(SolverState * state);
5656
virtual void RestoreSolverState(const SolverState& state);
5757
// history maintains the historical momentum data.
5858
vector<shared_ptr<Blob<Dtype> > > history_;
59+
60+
DISABLE_COPY_AND_ASSIGN(SGDSolver);
5961
};
6062

6163

src/caffe/proto/caffe.proto

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ message SolverParameter {
112112
// whether to snapshot diff in the results or not. Snapshotting diff will help
113113
// debugging but the final protocol buffer size will be much larger.
114114
optional bool snapshot_diff = 14 [ default = false];
115-
// Adagrad solver parameters
116-
// For Adagrad, we will first run normal sgd using the sgd parameters above
117-
// for adagrad_skip iterations, and then kick in the adagrad algorithm, with
118-
// the learning rate being adagrad_gamma * adagrad_skip. Note that the adagrad
119-
// algorithm will NOT use the learning rate multiplier that is specified in
120-
// the layer parameter specifications, as it will adjust the learning rate
121-
// of individual parameters in a data-dependent way.
122-
// WORK IN PROGRESS: not actually implemented yet.
123-
optional float adagrad_gamma = 15; // adagrad learning rate multiplier
124-
optional float adagrad_skip = 16; // the steps to skip before adagrad kicks in
125115
}
126116

127117
// A message that stores the solver snapshots

src/caffe/solver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Dtype SGDSolver<Dtype>::GetLearningRate() {
116116

117117
template <typename Dtype>
118118
void SGDSolver<Dtype>::PreSolve() {
119-
// First of all, see if we need to initialize the history
119+
// Initialize the history
120120
vector<shared_ptr<Blob<Dtype> > >& net_params = this->net_->params();
121121
history_.clear();
122122
for (int i = 0; i < net_params.size(); ++i) {

0 commit comments

Comments
 (0)