robust_mtnt icon indicating copy to clipboard operation
robust_mtnt copied to clipboard

Compatibility with newer versions of Pytorch

Open ahmadrash opened this issue 5 years ago • 1 comments

Are there any plans to make this compatible with Pytorch 0.4 or after. Thanks !

ahmadrash avatar May 23 '19 19:05 ahmadrash

Hi, seems the code is almost compatible with the newer pytorch versions. I tried training a model on pytorch 1.0.1.post2 and the code compiled with just one small error of requiring a long tensor for doing comparison operations. To be specific, I changed the following lines:

line 81: a = torch.arange(max(input_len)).unsqueeze(0).expand(len(input_len), -1).long() line 82: b = to_tensor(np.array(input_len)).unsqueeze(1).long()

Let me know if you encountered errors in the decoding phase.

MysteryVaibhav avatar Oct 02 '19 17:10 MysteryVaibhav