I am using the autograd anomaly detector and it gave the following error “Function ‘SymeigBackward’ returned nan values in its 0th output.” Looking at the symeig function description, I saw that such nan values in the backward pass can happen when there are non-unique eigen values. " Extra care needs to be taken when backward through outputs. Such operation is really only stable when all eigenvalues are distinct. Otherwise, NaN can appear as the gradients are not properly defined."