BiLSTM for Text Classification

I want to implement a Bi-LSTM for Text Classification using fastai. I watched the Lesson-10 video but am quite unsure about what changes I have to to do to the Lesson-10 notebook to implement a Bi-LSTM to improve the accuracy on my own dataset.

Can anyone please help me out?

1 Like

you’ll have to train two models - one forward one backward and then ensemble both models for predictions. See fastai’s nlp course notebooks for an example:

Train language model + enable

Train backward language model

The notebooks are still fastai v1 - I created a repo to train a German ulmfit language model with fastai2:

Florian