PyTorch Optimizer Lr Scheduler
Project description
torch-lr-scheduler
PyTorch Optimizer Lr Scheduler.
Installation
Need Python 3.6+.
pip install torch-lr-scheduler
Usage
import torch_lr_scheduler
lr_scheduler = torch_lr_scheduler.factory(config={
'line_chain': [{
# warm up to 0.8
'mode': 'linear',
'ratio': 0.01,
'start': 0.2,
'target': 0.8
}, {
# cosine to 0.0
'mode': 'cosine',
'ratio': 1.0,
'target': 0.0
}]
})
print(lr_scheduler)
#> LrScheduler (learning_rate_scale: 1.0) with LineChain (
#> 1.0%, linear from 0.2 to 0.8,
#> 100.0%, cosine from 0.8 to 0.0,
#> )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for torch-lr-scheduler-0.0.5.post4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 207a0b0a4687b3c0455a713d4dca8b4ec13b146fdde446082c709cc09d0e370d |
|
MD5 | 6f87ee1575583743a569a50084253374 |
|
BLAKE2b-256 | a9464cf1948428a5e9b43dafe58c3e5c080db6a06dc54676f031a862b011f2da |