Sandeep_Kumar_GITAM:

I am getting the same error for other kernels like rbf, Gaussian. Can you please suggest any modifications in code.


The error is emerging from the calculation of the Loss. Could you print the loss value? (Before calling .backward()) And also print out the value of,



 AlphaBetaGamma96:

((input_unfold - weight_flat).sum(dim=2))


to check it’s finite. If the loss is infinite, it will become NaN in the backward pass.