Hi,
instead of using
tensor_image[0][0] = tensor_image[0][0].sub(0.5).div(0.5);
		tensor_image[0][1] = tensor_image[0][1].sub(0.5).div(0.5);
		tensor_image[0][2] = tensor_image[0][2].sub(0.5).div(0.5);

Just try tensor_image = tensor_image.sub(0.5).div(0.5)
Also, it’s better to monitor the output tensor’s sum or mean rather than all the values in the output tensor.