Yes, as @ptrblck said, you might want to double check that this is still detected as a parameter properly (it won’t).
You want to use self.weight = torch.nn.Parameter(torch.empty([7, 32, 32], dtype=torch.float, device="cuda")) to make sure that what is saved is an nn.Parameter and not what is returned by the .to() operation (which will be a Tensor).