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

Possible bug in a call?

Open tridemax opened this issue 6 years ago • 3 comments
trafficstars

https://github.com/kimiyoung/transformer-xl/blob/44781ed21dbaec88b280f74d9ae2877f52b492a5/pytorch/mem_transformer.py#L733

Function signature is: def _update_mems(self, hids, mems, qlen, mlen):

And the call is: new_mems = self._update_mems(hids, mems, mlen, qlen)

mlen and qlen probably misordered in the function call?

tridemax avatar Aug 08 '19 12:08 tridemax

@tridemax was there any improvement in performance after this correction?

mvedang avatar Aug 16 '19 17:08 mvedang

TBH, I didn't tried it in your code, in my TF2.0 implementation I've did it swapped and seems it works. =)

tridemax avatar Aug 16 '19 19:08 tridemax

This is indeed a bug, but fortunately it does not affect the training process.

liuzhejun avatar Oct 20 '19 10:10 liuzhejun