diff --git a/src/caffe/util/io.cpp b/src/caffe/util/io.cpp index ad835e35d66..4a22e18725d 100644 --- a/src/caffe/util/io.cpp +++ b/src/caffe/util/io.cpp @@ -78,7 +78,7 @@ bool ReadImageToDatum(const string& filename, const int label, return false; } if (height > 0 && width > 0) { - cv::resize(cv_img_origin, cv_img, cv::Size(height, width)); + cv::resize(cv_img_origin, cv_img, cv::Size(width, height)); } else { cv_img = cv_img_origin; }