I tried casting it to double but it fails with error
RuntimeError: Expected object of type torch.FloatTensor but found type torch.DoubleTensor for argument #4 'mat1'
Seems like linear only works with float32