robust_mtnt
robust_mtnt copied to clipboard
Compatibility with newer versions of Pytorch
Are there any plans to make this compatible with Pytorch 0.4 or after. Thanks !
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.