@MKy I have never seen this error but a fix would be to call  .double()  on your model (or  .float()  on the input). I would suggest you to add ‘.float()’ to your input and see
Screenshot from 2018-12-17 14-34-04.png1035×205 41.6 KB

Try writting
q = torch.arange(0, 20).storage().float()
x = torch.empty(0).set_(q, storage_offset = 5, size = (3, 2), stride = (4, 1))