fastbook icon indicating copy to clipboard operation
fastbook copied to clipboard

Fix LMModel7 callback in Learner (Chapter 12)

Open thatgeeman opened this issue 4 years ago • 1 comments
trafficstars

Fixes #445

The change is to provide rnn_cbs(alpha=2, beta=1) as the callback for the LMModel7 custom Learner in the main notebook 12_nlp_dive.ipynb and in clean/12_nlp_dive.ipynb. No changes needed for TextLearner as it does this internally.

Also changed the text just before defining the Learner from

We can create a regularized Learner using the RNNRegularizer callback:

to

We can create a regularized Learner and use the rnn_cbs function to generate a list of all the callbacks (ModelResetter, RNNRegularizer and RNNCallback) that we need:

P.S. This matters only if we try learn.fit right after defining the Learner.

thatgeeman avatar May 28 '21 20:05 thatgeeman

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB