DeepCCA
DeepCCA copied to clipboard
Backward pass returns Nan after the first batch
Hi, I was working on a PyTorch version of your keras code of the cca loss. I was using a deep network to get features from X1, which gives me the H1 and the H2 is an unperturbed version of X2. The aim is to maximize the correlation between H1 and H2, so basically learn a transformation of X1 (using the deep network) that maximizes its correlation with X2. However, the backward pass returned Nan in the 'SymeigBackward' function (this is in PyTorch, the backprop function for symeig function. It is supposed to work the same as the T.nlinalg.eigh function of Theano). This problem gets somewhat resolved if I decrease the regularization parameter cca_reg1. But I am not sure why this happens. Any help would be much appreciated. Also, even if the backward doesn't throw Nans the corr loss doesn't seem to reduce. I guess this might be something else though. (Just mentioning in case it might help understand what's going on). Thanks a bunch :)
Hi, I was working on a PyTorch version of your keras code of the cca loss. I was using a deep network to get features from X1, which gives me the H1 and the H2 is an unperturbed version of X2. The aim is to maximize the correlation between H1 and H2, so basically learn a transformation of X1 (using the deep network) that maximizes its correlation with X2. However, the backward pass returned Nan in the 'SymeigBackward' function (this is in PyTorch, the backprop function for symeig function. It is supposed to work the same as the T.nlinalg.eigh function of Theano). This problem gets somewhat resolved if I decrease the regularization parameter cca_reg1. But I am not sure why this happens. Any help would be much appreciated. Also, even if the backward doesn't throw Nans the corr loss doesn't seem to reduce. I guess this might be something else though. (Just mentioning in case it might help understand what's going on). Thanks a bunch :)
Hi, I was also working on a PyTorch version and meet the same problem as yours. Have you solved the problem?
Hi, Sorry I switched to other things and didn't get a chance to look at it again after that. There were some resources on eigenval calculation and backward through them. I will look through and post some resources when I get time :) Apologies for not being of much help :(
Have you solved the problem? I have been troubled by this problem for a long time. @li-shipeng