Thanks, I run your code and it seems to be like I have. So my pipeline has an issue :
 tensor = torch::from_blob(open_cv.data, { 1, height, width, channels = 3 }, at::kByte).to(at::kFloat).div(255).permute({ 0, 3, 1, 2 })) gives a Tensor of dimension {1, 3, height, width}.
Then I do :
model.forward({ tensor }).toTensor().to(at::kByte).squeeze().permute({ 1,2,0 }) to have a tensor of dimension  {height, width, 3} for OpenCV displaying.
When I do not do model.forward the result is normal.