LR finder broken
See original GitHub issue#614 🐛 Bug
To Reproduce
Steps to reproduce the behavior:
model = TestModel()
trainer = pl.Trainer(gpus=1, default_save_path=exp_path, max_epochs=100)
def configure_optimizers(self):
optim = torch.optim.Adam(self.parameters(), lr=self.lr)
sched = torch.optim.lr_scheduler.ReduceLROnPlateau(optim, 'min')
return [optim], [sched]
# Run learning rate finder
lr_finder = trainer.lr_find(model)
# Results can be found in
lr_finder.results
# Plot with
fig = lr_finder.plot(suggest=True)
fig.show()
The following returns consistently:
optimizer got an empty parameter list
The regular .fit method works as expected.
PL version: ‘0.7.6’
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
LR finder broken 2: not sure why (and other tiny bugs) #2814
Bug LR finder doesn't seem to work. The model doesn't train when trainer.lr_find(model) is running (the loss metric oscillates around its ...
Read more >Broken pipe error after calling lr finder - fast.ai Course Forums
Broken pipe error after calling lr finder ... Unfortunately, I am getting an error BrokenPipeError: [Errno 32] Broken pipe after calling.
Read more >Developers - LR finder broken - - Bountysource
#614 Bug. To Reproduce. Steps to reproduce the behavior: model = TestModel() trainer = pl.Trainer(gpus=1, default_save_path=exp_path, max_epochs=100) def ...
Read more >Have I implemented implemenation of learning rate finder ...
1 Answer 1 · You are using Adam, which scales the learning rate adaptively for each parameter in the network. · A well...
Read more >Basic troubleshooting steps to fix issues in Lightroom Classic
If none of the troubleshooting steps above solve your problem, ... To do so, press Option and choose Go > Library in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Molaire Don’t use
prepare_dataand instead callfitandlr_findwith a dataloader parameter that you’ve processed and initialized outside of the model (I actually like to put a static method in the model for it just to keep it tidy).Yep, thanks!