kimiyoung / transformer-xl

Apache License 2.0
3.6k stars 762 forks source link

wrong argument order of _update_mems function! #118

Open jech2 opened 4 years ago

jech2 commented 4 years ago

In transformer-xl/pytorch/mem_transformer.py, I found the argument order of _update_mems ftn(member of class MemTransformerLM) is wrong! < See difference > 619th line : def _update_mems(self, hids, mems, qlen, mlen): 733th line : new_mems = self._update_mems(hids, mems, mlen, qlen)

I tested the code when qlen == mlen, so the code worked without any problem, but the code should be corrected, for the case when qlen != mlen. Thanks!

lujiarui-iie commented 10 months ago

thx