In my codes, I have used torch.clamp as follows:
epsilon = 1e-6
ypred =  torch.clamp(ypred, epsilon, 1-epsilon)
and got error message as follows:
Error: Function ‘ClampBackward’ returned nan values in its 0th output.
I have no idea what the problem is. Any suggestions?