pinocchio:

net.to(device)


Your second variant is copying the net to the device, but not assigning the copy to anything. to(device) is not an in-place operation, so this effectively doesn’t do anything.