yuanli2333 / CKA-Centered-Kernel-Alignment

Reproduce CKA: Similarity of Neural Network Representations Revisited

Home Page:https://arxiv.org/abs/1905.00414

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The cca code have this error"numpy.linaglg.LinAlgError: SVD did not converge"

splendiddiddid opened this issue · comments

hello, excuse. I meet this error when I use the cca code to compute the similarity of two models‘ output,batch size is 256 and the output dimension is 2048. there is something wrong when computing the SVD,I have no idea with it, could you give me some help?Thanks very much!

commented

The matrix is ill-conditioned. Either it is very low rank or the values in it are 0. Try pseudo inverse, or use a larger batch size so that the rank changes.