Hi,
I’m trying to do conv2d with non-negative values, but getting negative values in the output.
z1 = F.conv2d((input * input), sigma_square, None, self.stride, self.padding, self.dilation, self.groups)
The input pixels are x*x, and the weights are the variance which is non negative by definition (I also made sure it’s non-negative here) .
My guess it relates to  numerical error because the values are very close to zero (10e-5), but I’m not sure.
Any idea how I can solve it? (I have sqrt(z1) after the conv2d, so it can’t be negative).