torch-parameter-groups

Group PyTorch Parameters according to Rules.
Installation
Need Python 3.6+.
pip install torch-parameter-groups
Usage
import torch
import torch.nn as nn
import torch_basic_models
import torch_parameter_groups
model = torch_basic_models.MobileNetV2.factory()
optimizer = torch_parameter_groups.optimizer_factory(
model=model,
config={
'type': 'SGD',
'kwargs': {
'momentum': 0.9,
'nesterov': True,
'weight_decay': 0.0001,
},
'rules': [
{
'param_name_list': ['weight'],
'kwargs': {
'weight_decay': 0
}
},
{
}
]
},
)
criterion = nn.CrossEntropyLoss()
output = model(torch.randn(1, 3, 224, 224))
loss = criterion(output, torch.Tensor([0]).long())
loss.backward()
optimizer.step(closure=None)
Metadata
Release files for torch-parameter-groups 0.0.5.post1
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 | |
|---|---|---|---|---|
| torch-parameter-groups-0.0.5.post1.tar.gz | 4.9 kB | Without provenance | Details |
Release files / torch-parameter-groups-0.0.5.post1.tar.gz
| Download URL | torch-parameter-groups-0.0.5.post1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea9d3aa3290cd5cde56b5c4df7a24178d62ad0fd196c37cdd6e3ec3f17ae43ae
|
|
BLAKE2b-256 checksum How to use checksums |
2a4a026bb9d13dd766b8ac35c6f938d01f2b85720923a7caa6d16aabdc59fbf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.3
|
Security for torch-parameter-groups 0.0.5.post1
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.