Thanks for reply. And sorry for confusing.
x is just a variable of the equation ‘y = |x|’, not the input or output of network.
I just wonder when try to differentiate the y = |x|, how the torch handle when x is 0 although it is impossible to differentiate at that point.