huggingface / candle

Minimalist ML framework for Rust
Apache License 2.0
15.91k stars 963 forks source link

Add LRSchedulers #2603

Open DimitriTimoz opened 2 weeks ago

DimitriTimoz commented 2 weeks ago

Implement the LRSchedulers inspired by how PyTorch handles them. Include some basic schedulers.

The learning rate is updated as follows:

opt.set_learning_rate(scheduler.step(step)?);