Are you using an older version of the library? I remember encountering this when the _one_hidden function was hardcoded to return a tensor of size (1, bs, n_hidden), but this has since been updated.
Don’t think. I pip install fastai daily because I work on Google colab.
[EDIT] I tried pip install fastai==1.0.42. This is breaking a few functions that were working with fastai. How do you know the latest version of the library. Also, version specific code?
After some digging around, it would appear that although in the Github repo the hardcoding was fixed, when conda installing the stable release of fastai the problem is still there
Note that you can’ train a bidirectional language model as the targets can’t be shifted 1 to the left and the right at the sane time. The bidir option has been left for classifiers not using any pretrained models.
Oh dear, that was something that completely slipped through my mind. Now that you mention it, it seems painfully obvious why we can’t train a bidirectional LM.
You can train two models: one forward, one backward. Then ensemble the results. That can help to boost performance and increase the robust model in the end.
Hi,
can you please explain what it means that you left it for classifiers not using any pretrained models?
it’s called awd_lstm_clas_config. when is it used if not in a text classifier with AWD_LSTM arch?
or did you mean the bidir=True option won’t work with ULMFit (language model and then classifier based on that vocab)?