Fix a typo in the assert
authorFei Sun <feisun@fb.com>
Sat, 15 Dec 2018 17:07:02 +0000 (09:07 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 15 Dec 2018 17:09:09 +0000 (09:09 -0800)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15265

Reviewed By: llyfacebook

Differential Revision: D13477029

Pulled By: sf-wind

fbshipit-source-id: 9c5571a583c01f9701625541ebec0c836cb923f2

binaries/convert_image_to_tensor.cc

index f0cc736..785102f 100755 (executable)
@@ -131,7 +131,7 @@ cv::Mat resizeImage(cv::Mat& img) {
   int scaled_height = int(round(img.rows * im_scale));
   assert((scaled_width <= max_size) && (scaled_height <= max_size));
   if ((scaled_width < min_size) || (scaled_height < min_size)) {
-    assert((scaled_width == max_size) || (scaled_width == max_size));
+    assert((scaled_width == max_size) || (scaled_height == max_size));
   } else {
     assert((scaled_width == min_size) || (scaled_height == min_size));
   }