RuntimeError: Function 'SqrtBackward' returned nan values in its 0th output

can use
torch.sqrt(x + 1e-8)
replace
torch.sqrt(x)
to solve this problem

7 Likes