Hi,
For modules, you should save your parameters as self:
self.weight = Parameter(torch.rand(weight_size))
This way when you will call .cuda() on your model, they will be moved automatically to the gpu with all other parameters.