The Pytorch lightning finds no tuner in lr_find_results=trainer.tuner.lr_find

93 views Asked by At

I'm working on using PyTorch Lightning to train a neural network with a DataLoader. I have installed PyTorch and PyTorch Lightning successfully. However, I am encountering an issue with the learning rate finder (lr_find).

Here's an inline link to google collab [https://colab.research.google.com/drive/1nZDozOXunlibCmQfRHw1JSDHSTYEmdoC?authuser=0#scrollTo=5no2Y6ngEcjT]

model= BasicLightningTrain()
trainer=L.Trainer(max_epochs=34)

lr_find_results=trainer.tuner.lr_find(model,
                                  train_dataloaders=dataloader,
                                  min_lr=0.001,
                                  max_lr=1.0,
                                  early_stop_threshold=None)

Here's an inline link to google collab [https://colab.research.google.com/drive/1nZDozOXunlibCmQfRHw1JSDHSTYEmdoC?authuser=0#scrollTo=5no2Y6ngEcjT]

model= BasicLightningTrain()
trainer=L.Trainer(max_epochs=34)

lr_find_results=trainer.tuner.lr_find(model,
                                  train_dataloaders=dataloader,
                                  min_lr=0.001,
                                  max_lr=1.0,
                                  early_stop_threshold=None)

Error:

AttributeError: 'Trainer' object has no attribute 'tuner'

I am getting an AttributeError: 'Trainer' object has no attribute 'tuner'. How can I resolve this issue and correctly use the learning rate finder with PyTorch Lightning?

0

There are 0 answers