Name | adam-atan2-pytorch JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Adam-atan2 for Pytorch |
upload_time | 2024-10-23 14:38:55 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License Copyright (c) 2024 Phil Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
adam
artificial intelligence
deep learning
optimizers
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<img src="./adam-atan2.png" width="400px"></img>
## Adam-atan2 - Pytorch
Implementation of the proposed <a href="https://arxiv.org/abs/2407.05872">Adam-atan2</a> optimizer in Pytorch
A multi-million dollar paper out of google deepmind proposes a small change to Adam update rule (using `atan2`) to remove the epsilon altogether for numerical stability and scale invariance
It also contains some features for improving plasticity (continual learning field)
## Install
```bash
$ pip install adam-atan2-pytorch
```
## Usage
```python
import torch
from torch import nn
# toy model
model = nn.Linear(10, 1)
# import AdamAtan2 and instantiate with parameters
from adam_atan2_pytorch import AdamAtan2
opt = AdamAtan2(model.parameters(), lr = 1e-4)
# forward and backwards
for _ in range(100):
loss = model(torch.randn(10))
loss.backward()
# optimizer step
opt.step()
opt.zero_grad()
```
## Citations
```bibtex
@inproceedings{Everett2024ScalingEA,
title = {Scaling Exponents Across Parameterizations and Optimizers},
author = {Katie Everett and Lechao Xiao and Mitchell Wortsman and Alex Alemi and Roman Novak and Peter J. Liu and Izzeddin Gur and Jascha Narain Sohl-Dickstein and Leslie Pack Kaelbling and Jaehoon Lee and Jeffrey Pennington},
year = {2024},
url = {https://api.semanticscholar.org/CorpusID:271051056}
}
```
```bibtex
@inproceedings{Kumar2023MaintainingPI,
title = {Maintaining Plasticity in Continual Learning via Regenerative Regularization},
author = {Saurabh Kumar and Henrik Marklund and Benjamin Van Roy},
year = {2023},
url = {https://api.semanticscholar.org/CorpusID:261076021}
}
```
```bibtex
@article{Lewandowski2024LearningCB,
title = {Learning Continually by Spectral Regularization},
author = {Alex Lewandowski and Saurabh Kumar and Dale Schuurmans and Andr'as Gyorgy and Marlos C. Machado},
journal = {ArXiv},
year = {2024},
volume = {abs/2406.06811},
url = {https://api.semanticscholar.org/CorpusID:270380086}
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "adam-atan2-pytorch",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "adam, artificial intelligence, deep learning, optimizers",
"author": null,
"author_email": "Phil Wang <lucidrains@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ca/e4/4796f5a1d521830b5169a07f9373f6b4b80aa412e97da769180878e6b147/adam_atan2_pytorch-0.1.1.tar.gz",
"platform": null,
"description": "<img src=\"./adam-atan2.png\" width=\"400px\"></img>\n\n## Adam-atan2 - Pytorch\n\nImplementation of the proposed <a href=\"https://arxiv.org/abs/2407.05872\">Adam-atan2</a> optimizer in Pytorch\n\nA multi-million dollar paper out of google deepmind proposes a small change to Adam update rule (using `atan2`) to remove the epsilon altogether for numerical stability and scale invariance\n\nIt also contains some features for improving plasticity (continual learning field)\n\n## Install\n\n```bash\n$ pip install adam-atan2-pytorch\n```\n\n## Usage\n\n```python\nimport torch\nfrom torch import nn\n\n# toy model\n\nmodel = nn.Linear(10, 1)\n\n# import AdamAtan2 and instantiate with parameters\n\nfrom adam_atan2_pytorch import AdamAtan2\n\nopt = AdamAtan2(model.parameters(), lr = 1e-4)\n\n# forward and backwards\n\nfor _ in range(100):\n loss = model(torch.randn(10))\n loss.backward()\n\n # optimizer step\n\n opt.step()\n opt.zero_grad()\n```\n\n## Citations\n\n```bibtex\n@inproceedings{Everett2024ScalingEA,\n title = {Scaling Exponents Across Parameterizations and Optimizers},\n author = {Katie Everett and Lechao Xiao and Mitchell Wortsman and Alex Alemi and Roman Novak and Peter J. Liu and Izzeddin Gur and Jascha Narain Sohl-Dickstein and Leslie Pack Kaelbling and Jaehoon Lee and Jeffrey Pennington},\n year = {2024},\n url = {https://api.semanticscholar.org/CorpusID:271051056}\n}\n```\n\n```bibtex\n@inproceedings{Kumar2023MaintainingPI,\n title = {Maintaining Plasticity in Continual Learning via Regenerative Regularization},\n author = {Saurabh Kumar and Henrik Marklund and Benjamin Van Roy},\n year = {2023},\n url = {https://api.semanticscholar.org/CorpusID:261076021}\n}\n```\n\n```bibtex\n@article{Lewandowski2024LearningCB,\n title = {Learning Continually by Spectral Regularization},\n author = {Alex Lewandowski and Saurabh Kumar and Dale Schuurmans and Andr'as Gyorgy and Marlos C. Machado},\n journal = {ArXiv},\n year = {2024},\n volume = {abs/2406.06811},\n url = {https://api.semanticscholar.org/CorpusID:270380086}\n}\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Phil Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Adam-atan2 for Pytorch",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://pypi.org/project/adam_atan2_pytorch/",
"Repository": "https://github.com/lucidrains/adam_atan2_pytorch"
},
"split_keywords": [
"adam",
" artificial intelligence",
" deep learning",
" optimizers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eab9410aa3242350c6e1e91bca21755f38f9ca19fa3450f81e5bd50429973ab2",
"md5": "342bc11c41d8bae107d0f59cb86b4655",
"sha256": "36643edd3065adbaccf99775b1d9ff46e11a5d1cc1ae4aa48fc70486d36dade3"
},
"downloads": -1,
"filename": "adam_atan2_pytorch-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "342bc11c41d8bae107d0f59cb86b4655",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8392,
"upload_time": "2024-10-23T14:38:54",
"upload_time_iso_8601": "2024-10-23T14:38:54.015889Z",
"url": "https://files.pythonhosted.org/packages/ea/b9/410aa3242350c6e1e91bca21755f38f9ca19fa3450f81e5bd50429973ab2/adam_atan2_pytorch-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cae44796f5a1d521830b5169a07f9373f6b4b80aa412e97da769180878e6b147",
"md5": "572e9b9e08f8a5a82eb0220c72fde792",
"sha256": "193407d4c6a4dfebd1cbeadbe46a5bfb06b33d8f61d42ff181aa9c49c721486b"
},
"downloads": -1,
"filename": "adam_atan2_pytorch-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "572e9b9e08f8a5a82eb0220c72fde792",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 418757,
"upload_time": "2024-10-23T14:38:55",
"upload_time_iso_8601": "2024-10-23T14:38:55.094417Z",
"url": "https://files.pythonhosted.org/packages/ca/e4/4796f5a1d521830b5169a07f9373f6b4b80aa412e97da769180878e6b147/adam_atan2_pytorch-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-23 14:38:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lucidrains",
"github_project": "adam_atan2_pytorch",
"github_not_found": true,
"lcname": "adam-atan2-pytorch"
}