{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/1759","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/1759/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/1759/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/1759/events","html_url":"https://github.com/BVLC/caffe/pull/1759","id":54901538,"number":1759,"title":"Refactored solvers with fluent pattern","user":{"login":"nakosung","id":2463571,"avatar_url":"https://avatars.githubusercontent.com/u/2463571?v=3","gravatar_id":"","url":"https://api.github.com/users/nakosung","html_url":"https://github.com/nakosung","followers_url":"https://api.github.com/users/nakosung/followers","following_url":"https://api.github.com/users/nakosung/following{/other_user}","gists_url":"https://api.github.com/users/nakosung/gists{/gist_id}","starred_url":"https://api.github.com/users/nakosung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nakosung/subscriptions","organizations_url":"https://api.github.com/users/nakosung/orgs","repos_url":"https://api.github.com/users/nakosung/repos","events_url":"https://api.github.com/users/nakosung/events{/privacy}","received_events_url":"https://api.github.com/users/nakosung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-20T16:06:39Z","updated_at":"2015-01-22T03:43:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/1759","html_url":"https://github.com/BVLC/caffe/pull/1759","diff_url":"https://github.com/BVLC/caffe/pull/1759.diff","patch_url":"https://github.com/BVLC/caffe/pull/1759.patch"},"body":"I refactored solvers with fluent pattern to add a solver like rmsprop, which isn't included in this PR. After merging this PR, rmsprop will be proposed.\r\n\r\nA cool thing introduced by this PR is keeping code DRY(Do not Repeat Yourself). You don't have to write similar code paths for cpu/gpu.\r\n\r\nModified ADAGRAD solver is like below:\r\n```\r\nop\r\n      // compute square of gradient in update\r\n      .sqr(param, update)\r\n      // update history\r\n      .add(update,history,history)\r\n      // prepare update\r\n      .sqrt(history,update)\r\n      .add_scalar(delta,update)\r\n      .div(param,update,update)      \r\n      // scale and copy\r\n      .axpby(local_rate,update,Dtype(0),param)\r\n```"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/70967232","html_url":"https://github.com/BVLC/caffe/pull/1759#issuecomment-70967232","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/1759","id":70967232,"user":{"login":"sguada","id":1766524,"avatar_url":"https://avatars.githubusercontent.com/u/1766524?v=3","gravatar_id":"","url":"https://api.github.com/users/sguada","html_url":"https://github.com/sguada","followers_url":"https://api.github.com/users/sguada/followers","following_url":"https://api.github.com/users/sguada/following{/other_user}","gists_url":"https://api.github.com/users/sguada/gists{/gist_id}","starred_url":"https://api.github.com/users/sguada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sguada/subscriptions","organizations_url":"https://api.github.com/users/sguada/orgs","repos_url":"https://api.github.com/users/sguada/repos","events_url":"https://api.github.com/users/sguada/events{/privacy}","received_events_url":"https://api.github.com/users/sguada/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T03:43:22Z","updated_at":"2015-01-22T03:43:22Z","body":"It would be better if it were part of Blob so it could be used in the\r\nlayers.\r\n\r\nSergio\r\n\r\n2015-01-21 19:07 GMT-08:00 Evan Shelhamer <notifications@github.com>:\r\n\r\n> Agreed that this is a neat concept, but it's perhaps too local when done\r\n> only for the solver.\r\n>\r\n> Re: RMSprop, it is a solver that is on our TODO list so we'd welcome a PR\r\n> for it.\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/BVLC/caffe/pull/1759#issuecomment-70964830>.\r\n>"}}