Closed ZeWang95 closed 3 years ago
Hi Ze Wang,
The reason is that because backpropagation through SVD in PyTorch is quite sensitive to floating point overflow. This is just to prevent a weird behaviour when training the model, esp. with different versions of PyTorch.
Got it! Thanks! I was actually trying similar idea a long time ago, and did observe that torch.svd is very sensitve. This indeed is a good solution.
Hi! Thanks for sharing the code. I noticed that you converted the tensor to double before fedding to torch.svd May I ask why you have this implementation? Thanks!