ai-agent

pytorch-lr-finder: Optimize Learning Rates

Find optimal learning rates with pytorch-lr-finder, a tool for founders using PyTorch, backed by 1.0k+ GitHub stars

From the repo · “A learning rate range test implementation in PyTorch”

1,009 stars122 forksPythonGuide quality 8/10 · reviewed Aug 6Updated 6/24/2025100% free · open source
What it does

Automates the process of finding the optimal learning rate for a PyTorch model by performing a learning rate range test

When to use it
  • •When training a new PyTorch model and unsure about the ideal learning rate
  • •When experiencing underfitting or overfitting issues due to a suboptimal learning rate
  • •When comparing the performance of different PyTorch models with varying learning rates
Ready-to-paste prompt
lr_finder = LRFinder(model=resnet18(), optimizer=torch.optim.SGD(model.parameters(), lr=1e-6)); lr_finder.find(learning_rate=1e-6, end_lr=1, num_iter=100); lr_finder.plot()
Heads up: Make sure to specify the correct model and optimizer when initializing the LRFinder instance, as the learning rate range test will be performed on the provided model and optimizer
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

⚡ Runs out of the box

A prompt/skill package — nothing to install beyond adding it to your AI tool.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/pytorch-lr-finder && curl -fsSL https://workflowstacks.com/api/skills/pytorch-lr-finder/claude-skill -o ~/.claude/skills/pytorch-lr-finder/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How pytorch-lr-finder: Optimize Learning Rates works
Codeflow
Free to inspect

Pytorch-lr-finder: Optimize Learning Rates is mostly documents (5 doc files, 5 small scripts) — something you read, not something you run. There is nothing to install. Last commit 16 months ago, MIT license.

Size
Mostly documents
5 documents · 5 small scripts · 2 min skim
Setup
Nothing to install
A course / notebook collection. Read it; run cells if you like.
Runs on
Nowhere — you read it
A reading resource, not a program.
Python 100%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    examples/README.md
    A worked example — copy this to get going
What's in each folder
examples/Examples you can copy8 files
torch_lr_finder/Folder2 files
.github/CI / automation (GitHub Actions)7 files
tests/Tests — proof it works6 files
images/Images & static assets1 files
READMEHas testsDocumentedCI checksExamples includedMIT licenseLast update 16 mo ago
Quick Actions
Details
Creator
davidtvs
Language
Python
Category
ai-agent
Published
11/20/2018

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/pytorch-lr-finder.svg)](https://workflowstacks.com/skills/pytorch-lr-finder?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.