Skip to content

Instantly share code, notes, and snippets.

@anand086
Created July 6, 2021 06:55
Show Gist options
  • Save anand086/7cce2e3d06d3801c6748b3ed1f557152 to your computer and use it in GitHub Desktop.
Save anand086/7cce2e3d06d3801c6748b3ed1f557152 to your computer and use it in GitHub Desktop.
from fastai.text.all import *
dls = TextDataLoaders.from_folder(untar_data(URLs.IMDB), valid='test')
learn = text_classifier_learner(dls, AWD_LSTM, drop_mult=0.5, metrics=accuracy)
learn.fine_tune(4, 1e-2)
learn.predict("I really liked that movie!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment