Lesson 4 imdb - exception when creating the learner


#1

I got an exception when executing the step that instantiates the learner. Namely, the following line:

learner = md.get_model(opt_fn, em_sz, nh, nl,
dropouti=0.05, dropout=0.05, wdrop=0.1, dropoute=0.02, dropouth=0.05)

And it produced:


235 rnn_enc = RNN_Encoder(n_tok, emb_sz, nhid=nhid, nlayers=nlayers, pad_token=pad_token,
–> 236 dropouth=dropouth, dropouti=dropouti, dropoute=dropoute, wdrop=wdrop, qrnn=qrnn, bias=bias)
237 enc = rnn_enc.encoder if tie_weights else None
238 return SequentialRNN(rnn_enc, LinearDecoder(n_tok, emb_sz, dropout, tie_encoder=enc))

TypeError: init() got an unexpected keyword argument ‘bias’

It looks like the bias parameter was added just three days ago. Is it ok if I just remove it temporarily? Are there any hidden consequences? Anyway, please help


(urmas pitsi) #2

The current version is broken, waiting for a pull request. It’s in the waiting list as I understand.
I made modification to the source directly.
If you’d like to do that, just add parameter: bias=false to RNN_Encoder initializer.