Fix compatibility issue with PyTorch 1.2
Using PyTorch 1.2.0 give an error when running XLNet.
We should use the new way to reverse mask : instead of using `1 - mask`, we should use `~mask`
Hi,
We can accept this since it breaks lower versions of PyTorch.
You can just feed your mask as a FloatTensor (as indicated in the docstrings I think).