Correct way to use bidirectional awd lstm language model learner?

If you’re in Part 2, you can see the solution here. If not, the solution per @dreambeats is to monkey patch _one_hidden, which is broken in the latest release.

def _one_hidden(self, l:int)->Tensor:
    nh = (self.n_hid if l != self.n_layers - 1 else self.emb_sz) // self.n_dir
    return one_param(self).new(self.n_dir, self.bs, nh).zero_()
learn.model[0]._one_hidden = partial( _one_hidden, learn.model[0])