CWanli / RecoNet

Tensor Low-rank Reconstruction for Semantic Segmentation
109 stars 11 forks source link

Code error report #10

Open RisingEntropy opened 2 years ago

RisingEntropy commented 2 years ago

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