Open mingwei82 opened 5 years ago
Hi Mike. Although the API had a default value None
for the states
field, it's actually required. You can get the value by calling the begin_state
function, similar to what's done in the ELMo tutorial.
We will need to add the logic to automatically call begin_state
in the hybrid_forward
in order to make the None
value for state working.
Hi,
I'm learning how to use the gluon-nlp package to learn nlp development step-by-step. I've decoupled parts of the model-zoo language model, where I replaced the encoder layer with my own RNN (e.g. instead of the standard or awd lstm, try doing the encoder layer by myself).
However, when I tried to replace the encoder layer (2-layer LSTM) with the bilm encoder block, I get an error that's in the hybrid forward itself that I don't understand (can't find much help or guidance on how to use the bilm encoder block, https://gluon-nlp.mxnet.io/_modules/gluonnlp/model/bilm_encoder.html)
Error excerpt:
Thanks Mike