As @Henry_Chibueze pointed out, the input x would be modified inplace, which would thus yield different results in return out + x.
You could either clone() x before passing it to the first relu:
out = self.relu(x.clone())

or just don’t use the inplace version.