Solved by ptrblck in post #4 
              
              
                You could try to use the device property of another parameter: 
class MyModule(nn.Module):
    def __init__(self):
        super(MyModule, self).__init__()
        self.fc1 = nn.Linear(1, 1)
    
    def forward(self, x):
        return x
    
    def get(self):
        device = self.fc1.weight.devi…