From 23d44308692e469bd7b587d1697ac68068986608 Mon Sep 17 00:00:00 2001 From: qipeng Date: Tue, 29 Jul 2014 19:56:36 -0700 Subject: [PATCH] fixes after rebase --- src/caffe/proto/caffe.proto | 8 ++++---- src/caffe/solver.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/caffe/proto/caffe.proto b/src/caffe/proto/caffe.proto index 73ae89d..9afe8e8 100644 --- a/src/caffe/proto/caffe.proto +++ b/src/caffe/proto/caffe.proto @@ -63,7 +63,7 @@ message NetParameter { // NOTE // Update the next available ID when you add a new SolverParameter field. // -// SolverParameter next available ID: 27 (last added: test_state) +// SolverParameter next available ID: 31 (last added: delta) message SolverParameter { ////////////////////////////////////////////////////////////////////////////// // Specifying the train and test networks @@ -118,7 +118,7 @@ message SolverParameter { optional float weight_decay = 12; // The weight decay. // regularization types supported: L1 and L2 // controled by weight_decay - optional string regularization_type = 25 [default = "L2"]; + optional string regularization_type = 28 [default = "L2"]; optional int32 stepsize = 13; // the stepsize for learning rate policy "step" optional int32 snapshot = 14 [default = 0]; // The snapshot interval optional string snapshot_prefix = 15; // The prefix for the snapshot. @@ -144,9 +144,9 @@ message SolverParameter { NESTEROV = 1; ADAGRAD = 2; } - optional SolverType solver_type = 26 [default = SGD]; + optional SolverType solver_type = 29 [default = SGD]; // numerical stability for AdaGrad - optional float delta = 27 [default = 1e-8]; + optional float delta = 30 [default = 1e-8]; // If true, print information about the state of the net that may help with // debugging learning problems. diff --git a/src/caffe/solver.cpp b/src/caffe/solver.cpp index 223194b..52fd652 100644 --- a/src/caffe/solver.cpp +++ b/src/caffe/solver.cpp @@ -510,7 +510,6 @@ void NesterovSolver::ComputeUpdateValue() { vector& net_params_weight_decay = this->net_->params_weight_decay(); // get the learning rate Dtype rate = this->GetLearningRate(); - Dtype delta = this->param_.delta(); if (this->param_.display() && this->iter_ % this->param_.display() == 0) { LOG(INFO) << "Iteration " << this->iter_ << ", lr = " << rate; } @@ -618,6 +617,7 @@ void AdaGradSolver::ComputeUpdateValue() { vector& net_params_weight_decay = this->net_->params_weight_decay(); // get the learning rate Dtype rate = this->GetLearningRate(); + Dtype delta = this->param_.delta(); if (this->param_.display() && this->iter_ % this->param_.display() == 0) { LOG(INFO) << "Iteration " << this->iter_ << ", lr = " << rate; } -- 2.7.4