Implement Rmsprop optimiser#8
Merged
JieRen98 merged 10 commits intometaopt:mainfrom May 1, 2022
Merged
Conversation
JieRen98
requested changes
Apr 29, 2022
| del params | ||
| nu = _update_moment_per_elem_norm(updates, state.nu, decay, 2, inplace) | ||
| if inplace: | ||
| def f(g, n): return g.mul_(torch.rsqrt_(n.add_(eps))) |
Collaborator
There was a problem hiding this comment.
应该不太对,n.add_会把n给inplace修改掉
Author
There was a problem hiding this comment.
修改了这里,同理还修正了其他会修改n的地方。另外修了一个test脚本的bug。
JieRen98
requested changes
Apr 29, 2022
| def f(g, n): return g.mul(torch.rsqrt(n.add(eps))) | ||
| # """The followings are pytorch style""" | ||
| # if inplace: | ||
| # def f(g, n): return g.div_(torch.sqrt_(n).add_(eps)) |
Collaborator
There was a problem hiding this comment.
建议把这个也修改一下,似乎应该是torch.sqrt(n).add_
Collaborator
|
是不是应该RMSprop -> RMSProp涅? |
Author
|
TF/PyTorch/Keras是RMSprop,Optax是RMSProp。那就按照Optax来吧 |
Collaborator
我看挺多论文都叫RMSProp |
Author
已提交修改 |
JieRen98
approved these changes
May 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.