transformer-xl icon indicating copy to clipboard operation
transformer-xl copied to clipboard

wrong argument order of _update_mems function!

Open jech2 opened this issue 5 years ago • 1 comments

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!

jech2 avatar Aug 25 '20 12:08 jech2

thx

lujiarui-iie avatar Nov 11 '23 09:11 lujiarui-iie