Make sure you divide by 255 to normalize your input before you run any processing.
that is make sure you have done sth like this:
tensor_image = tensor_image.toType(torch::kFloat).div(255);

This is most likeley the case ! tell us if this was it!