Can you run, before you enter the training loop:
net = net.float()
It will transform the model parameters to float.
And then in your training loop:
z = net(x.float())
That should proceed without error.
PS: replace .float() by .double() if you wish to have network + data in double precision format.