Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Adam solver #2918
Conversation
ronghanghu
added focus RH
labels
Aug 14, 2015
shelhamer
referenced
this pull request
Aug 14, 2015
Closed
Adaptive Solvers: AdaDelta, RMSprop, and ADAM #2860
|
|
|
@shelhamer @jeffdonahue @philkr @PatWie Please take a look if you have time. I think this should be ready to merge. This is last piece of the solver trilogy in #2860. After merging this one, we can address #2890. |
ronghanghu
added the
ready for review
label
Aug 14, 2015
jeffdonahue
commented on the diff
Aug 14, 2015
| @@ -218,6 +218,21 @@ class AdaDeltaSolver : public SGDSolver<Dtype> { | ||
| }; | ||
jeffdonahue
Contributor
|
|
Thanks for the rebase @ronghanghu and thanks @PatWie for the original implementation! See above comment; otherwise looks good. |
|
Citation added for Adam.
Let's address that in #2890 . |
jeffdonahue
and 1 other
commented on an outdated diff
Aug 14, 2015
| + this->history_.push_back( | ||
| + shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape))); | ||
| + } | ||
| +} | ||
| + | ||
| +template <typename Dtype> | ||
| +void AdamSolver<Dtype>::ComputeUpdateValue(int param_id, Dtype rate) { | ||
| + const vector<Blob<Dtype>*>& net_params = this->net_->learnable_params(); | ||
| + const vector<float>& net_params_lr = this->net_->params_lr(); | ||
| + Dtype local_rate = rate * net_params_lr[param_id]; | ||
| + const Dtype beta1 = this->param_.momentum(); | ||
| + const Dtype beta2 = this->param_.momentum2(); | ||
| + | ||
| + // we create aliases for convenience | ||
| + size_t update_history_offset = net_params.size(); | ||
| + shared_ptr<Blob<Dtype> > val_m = this->history_[param_id]; |
jeffdonahue
Contributor
|
|
Thanks for adding the citation. After a final glance I noticed the one other thing I commented above; sorry about not noticing before. Feel free to merge after addressing that. |
PatWie
referenced
this pull request
Aug 14, 2015
Merged
information about new implemented solvers #2920
|
Looks good. |
and others
added some commits
Aug 3, 2015
|
Changed from shared ptrs to raw ptrs in |
ronghanghu
added a commit
that referenced
this pull request
Aug 14, 2015
|
|
ronghanghu |
cbca8fe
|
ronghanghu commentedAug 14, 2015
Carried on Adam solver (originally #2856) for merge.
I completed the tests and rebased it to latest master.
Authorship belongs to @PatWie, and is preserved in git commit.
Original message in #2856 :
As you may see, now both solver.cpp and test_gradient_based_solver.cpp are growing to 1000+ lines. This problem will be addressed in #2890.