You might have the same issues in e.g. self.theta as you are manually specifying the device.
Generally, don’t use to('cuda') inside the model and let DataParallel move the parameters to the right device.