It would seem that there isn’t anything obviously wrong, maybe you can

print the strides/sizes of yo and/or
post a full example?

The following worked for me when I had a HWC 3-channel tensor res to start and cut it to your size:
  auto res2 = res.select(2, 0).slice(0, 0, 300).slice(1, 0, 200).contiguous();
  std::cout << res2.sizes() << "|" << res2.strides() << "\n";
  cv::Mat cv_res2(res2.size(0), res2.size(1), CV_8UC1, (void*) res2.data<uint8_t>());
  cv::namedWindow("Detected", cv::WINDOW_AUTOSIZE);
  cv::imshow("Detected", cv_res2);
  cv::waitKey(0);

gives [300, 200]|[200, 1] and works. (I’m on PyTorch masterrish from a week or two ago.)
Best regards
Thomas