CKA-Centered-Kernel-Alignment icon indicating copy to clipboard operation
CKA-Centered-Kernel-Alignment copied to clipboard

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

Open splendiddiddid opened this issue 1 year ago • 1 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!

splendiddiddid avatar Apr 20 '23 13:04 splendiddiddid

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.

23Uday avatar Apr 20 '23 18:04 23Uday