In pytorch(1.10), we can use torch.corrcoef to Estimates the Pearson product-moment correlation coefficient matrix. But there is an obvious problem, when a row is all 0, there will be a nan value, how can I modify it to solve it, I think I can make the similarity of this row and other rows all 1, but I don't know How to do it. nan value Continue reading...