In reconet.py line 51: self.lam = torch.ones(self.rank, requires_grad=True)
If you want to set a tensor as a trainable parameter, you should use self.lam = torch.nn.Parameters(torch.ones(self.rank)). This way, you can make the parameter trainable. Otherwise, loading parameters from file will lose lam tensor and set it all 1 instead
In reconet.py line 51:
self.lam = torch.ones(self.rank, requires_grad=True)
If you want to set a tensor as a trainable parameter, you should useself.lam = torch.nn.Parameters(torch.ones(self.rank))
. This way, you can make the parameter trainable. Otherwise, loading parameters from file will lose lam tensor and set it all 1 instead