Lr_find error in language model


#1

I continue trying to replicate lesson3-imdb.ipynb of the new Fastai course. After making sure my Python version (3.6.8), Pytorch (1.0.0) and fastai (1.0.39) are correct, I have managed to create
a learner. However, when I run the learning rate finder it produces a size mismatch for the loss function:

ValueError: Expected input batch_size (20106) to match target batch_size (6).

(This is with batch size 12, if I use 6 then it complains of size 10053 vs 3.) What may I be doing wrong?

I am sorry if any of these questions are too basic, I am unsure if they better belong in the “beginner” category better.

Thanks, as always!


#2

I solved the problem. It is a bit embarrassing, but since someone liked it post I will leave this here instead of deleting my question altogether.

Good news is: Lr_find works perfectly fine! Just be careful not to mix TextLMDataBunch.load and TextClasDataBunch.load