Lr_find validation loss of NA

#1

Hi All,

I’m trying to reuse some code from lesson3 (nlp on mnist) to build a language model.

bs=48
data_lm = (TextList.from_df(data)
.split_by_rand_pct(0.1)
#We randomly split and keep 10% (10,000 reviews) for validation
.label_for_lm()
#We want to do a language model so we label accordingly
.databunch(bs=bs))

learn = language_model_learner(data_lm, AWD_LSTM, drop_mult=0.3)
learn.lr_find()

However, I’m not getting a validation loss on the learning rate finder. I’m not sure why as I can get a validation loss when fitting the actual model.

Any tips?
Thanks

epoch train_loss valid_loss accuracy time
0 3.960693 #na# 00:33
1 3.958584 #na# 00:36
2 3.957576 #na# 00:35
3 3.948066 #na# 00:38
4 3.916027 #na# 00:36
5 3.765308 #na# 00:35
6 3.367810 #na# 00:37
7 3.159484 #na# 00:37
8 9.506555 #na# 01:27
2 Likes

(Abduljamiu O Amao) #2

learn.lr_find(), is helping you to optimize a particular learning rate and it does this by mocking training from a default start_lr to end_lr. I.e. it only need train_loss and learning rates ( which are provided in the default function) but you can modify by supplying start_lr and end_lr values. see LRFinder for the function/method details

0 Likes