Atiny is a gradient based PyTorch optimizer. Atiny uses half of Adam's memory to achieve results that are not inferior to Adam.
Project description
Atiny Optimizer
Atiny is a gradient based PyTorch optimizer. Atiny uses half of Adam's memory to achieve results that are not inferior to Adam.
思路说明
不使用二阶动量,而是使用一阶动量与当前梯度计算每个参数的更新补偿. 内置了一个学习率衰减器,自动为每组参数个性化的学习率衰减.(需要参数:ldr) 使用ArcSinh函数影响向量模长实现权重衰减
Demo程序
demo程序在test.py文件中,直接运行即可得到此页面中Atiny与Adam的对比图.(依赖visdom) demo中构建了一个神经网络用简陋的方式对一个包含动态随机参数的公式生成的周期性曲线进行预测.
Install
pip install Atiny
Use
from Atiny import Atiny
...
optimizer=Atiny(moduel.parameters(),lr=lr,ldr=ldr,weight_decay=weight_decay)
HomePage
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atiny-0.0.3.tar.gz.
File metadata
- Download URL: atiny-0.0.3.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758379cae33d90ea22286756e3e78461d4080ddf6028fb47b46cf2245311f172
|
|
| MD5 |
e20f42eaca1511cbf561dc6121af7a66
|
|
| BLAKE2b-256 |
260402e711c5570a5eb851018cf03b78bff774062a6bff3cbce35e3551e41341
|
Provenance
The following attestation bundles were made for atiny-0.0.3.tar.gz:
Publisher:
python-publish.yml on PsycheHalo/Atiny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atiny-0.0.3.tar.gz -
Subject digest:
758379cae33d90ea22286756e3e78461d4080ddf6028fb47b46cf2245311f172 - Sigstore transparency entry: 345509120
- Sigstore integration time:
-
Permalink:
PsycheHalo/Atiny@f23dc23a28d5414812ad3777b7c0d6e954005dbf -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/PsycheHalo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f23dc23a28d5414812ad3777b7c0d6e954005dbf -
Trigger Event:
release
-
Statement type:
File details
Details for the file atiny-0.0.3-py3-none-any.whl.
File metadata
- Download URL: atiny-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5278bb1f947367699db4d6e3427c631aef41bed2ce932fd5941ef074f57542d5
|
|
| MD5 |
3e20d260a6640539ef226ecd5693e3bb
|
|
| BLAKE2b-256 |
3e39732fcb4169c314c136e57c2363071625433fb1beca90862ae82cfcbbd2b1
|
Provenance
The following attestation bundles were made for atiny-0.0.3-py3-none-any.whl:
Publisher:
python-publish.yml on PsycheHalo/Atiny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atiny-0.0.3-py3-none-any.whl -
Subject digest:
5278bb1f947367699db4d6e3427c631aef41bed2ce932fd5941ef074f57542d5 - Sigstore transparency entry: 345509121
- Sigstore integration time:
-
Permalink:
PsycheHalo/Atiny@f23dc23a28d5414812ad3777b7c0d6e954005dbf -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/PsycheHalo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f23dc23a28d5414812ad3777b7c0d6e954005dbf -
Trigger Event:
release
-
Statement type: