AdamZ
A PyTorch implementation of AdamZ, an enhanced variant of the widely-used Adam optimizer, that is designed to improve upon its predecessor by offering more efficient convergence and potentially better generalization capabilities across various neural network training tasks.
Prerequisites
- Python 3.9 or later
- PyTorch 2.5.1
Usage
Instantiate the AdamZ optimizer similarly to other standard optimizers, ensuring you configure the hyperparameters to suit your specific task. Note that the performance of AdamZ is highly sensitive to these parameters, and default settings may not be optimal for all applications.
from adamz import AdamZ
import torch
model = torch.nn.Linear(10, 1)
optimizer = AdamZ(
model.parameters(),
lr=learning_rate,
overshoot_factor=0.5,
stagnation_factor=1.2,
stagnation_threshold=0.2,
patience=100,
stagnation_period=10
)
# Training loop
for input, target in dataset:
optimizer.zero_grad()
loss = loss_fn(model(input), target)
loss.backward()
optimizer.step()
Citation
If you find this code helpful, please cite our paper in the following format.
@misc{zaznov2024adamzenhancedoptimisationmethod,
title={AdamZ: An Enhanced Optimisation Method for Neural Network Training},
author={Ilia Zaznov and Atta Badii and Alfonso Dufour and Julian Kunkel},
year={2024},
eprint={2411.15375},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2411.15375},
}
Contributions
Contributions are welcome! Please feel free to submit a pull request or open an issue for suggestions and improvements.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any questions, please contact i.zaznov@pgr.reading.ac.uk or open an issue on GitHub.
Metadata
Release files for adamz 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| adamz-0.1.0.tar.gz | 21.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adamz-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.3 kB
Release files / adamz-0.1.0.tar.gz
| Download URL | adamz-0.1.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a6c73ddf44dfa713247deef318103d1877e43c1922def7fe887d4b8b628886b
|
|
BLAKE2b-256 checksum How to use checksums |
e5c9a72a84d90b8d262be2c162f1d6bfedaad16caf31fd09ec0561a18ffbb759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / adamz-0.1.0-py3-none-any.whl
| Download URL | adamz-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffffa5048014d5014179e5b44321cc7e618a05e7c08221839ecd132512fa11e1
|
|
BLAKE2b-256 checksum How to use checksums |
812d902a2d7228e7d3244c94026db1ed652e412f1b9aebf7a91b9bc1ef791d72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for adamz 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.