Skip to content

Instantly share code, notes, and snippets.

@ronykroy
Created October 22, 2019 09:28
Show Gist options
  • Save ronykroy/eb9f72dc644f2ee9b6195952de962eb3 to your computer and use it in GitHub Desktop.
Save ronykroy/eb9f72dc644f2ee9b6195952de962eb3 to your computer and use it in GitHub Desktop.
bs=32 # was 48
data_lm = TextLMDataBunch.from_df(train_df = df_trn, valid_df = df_val, path = path_d)
data_lm.save( path_d/'data_lm.pkl') # saving as a back stop
data_lm = load_data( '/sample_data2','data_lm.pkl', bs=bs)
learn = language_model_learner(data_lm, AWD_LSTM, drop_mult=0.3)
learn.lr_find()
learn.recorder.plot(skip_end=15)
learn.fit_one_cycle(10, 1e-2, moms=(0.8,0.7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment