Skip to main content

Pytorch Learning Rate Finder

This package can be used to find optimal learning rate.

The package includes LearningRateFinder class which implements the fit, find_optimal_lr method . The fit method is used to find optimal learning rate within a range (optional)

Installation

To install with pip run the following command

pip install pytorch-lr-finder

Dependencies

This package requires the following to be installed:

  • Python 3.6 or higher
  • Pytorch
  • Numpy
  • Pandas
  • Matplotlib

Instruction for usage

LearningRateFinder takes instantiated pytorch model (nn.module), criterion and optimizer (torch.optim).

The fit method requires a dataloader (torch.utils.data.DataLoader), you can optionally include the number of steps, the starting and ending learning rate. The plot function can be used to visualize the results in a plot. Please follow the example below for reference.

lrf = LearningRateFinder(model, criterion, optimizer)
lrf.fit(train_loader)
lrf.plot()

Example

plot example

Metadata

Release files for pytorch-lr-finder 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytorch-lr-finder 0.0.3
File Size Uploaded
pytorch_lr_finder-0.0.3.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytorch-lr-finder 0.0.3
File Interpreter ABI Platform
pytorch_lr_finder-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / pytorch_lr_finder-0.0.3.tar.gz

Download URL pytorch_lr_finder-0.0.3.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f4cbaece1791d98a9fca7492a8b638703fae373abe82aeca7233974efef71e3e
BLAKE2b-256 checksum
How to use checksums
650dba913895cbf07a8567fdff6945eb11ff2def42afd6e3dac47b829a59a9ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Release files / pytorch_lr_finder-0.0.3-py3-none-any.whl

Download URL pytorch_lr_finder-0.0.3-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7a33041dac862d8a91cf83ce8a152c2fa5a35d43d4310da5fea362feb1c58ee
BLAKE2b-256 checksum
How to use checksums
168bf3bbae6364bf78a2d31026d5f9cc80ef05d9fe3c8420067f2ea6da550444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page