I have only one last question here:
I have a cv::Mat which is CV_32S format contains signed float with negative values. (there is no other way to store negative values in opencv)
When I convert this Mat to tensor:
at::Tensor tensor_image = torch::from_blob(in_img.data, {1, in_img.rows, in_img.cols, 3}, torch::kByte);
  tensor_image = tensor_image.permute({0, 3, 1, 2}).to(torch::kFloat32).to(device_type);
  cout << "tensor_image: " << tensor_image << endl;

The result is totally wrong!! All negative values are gone!! This is totally different in python input model tensor values…
Anybody knows how to convert a cv::Mat with CV_32S type into a tensor and does not effect values store in it???