dmlc / gluon-nlp

NLP made easy
https://nlp.gluon.ai/
Apache License 2.0
2.56k stars 538 forks source link

Is decoder.decode_seq() in gluonnlp 0.8.3 replaced by decoder() in 0.9 ? #1234

Closed chenjunweii closed 4 years ago

chenjunweii commented 4 years ago

I have a code written before 0.9, and I use Transormer.decoder.decode_seq as teacher forcing to finetune BERT, after upgrading to 0.9, deocder.decode_seq() seems replaced by decoder(), am I Wrong ?

but the finetuning never converge after upgrading from version 0.8.3 to 0.9 and replacing decode_seq()withdecoder()

But if I change back to 0.8.3 with decode_seq() the code works perfectly, loss function decrease very stable, and text generate by beam search is also correct, any idea ?