From c7203772f9da28181a757a8004b67a0b97723cdc Mon Sep 17 00:00:00 2001 From: srand99 <842396273@qq.com> Date: Fri, 11 Dec 2015 10:03:08 +0800 Subject: [PATCH 1/5] Fix issue #893 Fix error about shape index --- src/io/image_augmenter.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/io/image_augmenter.h b/src/io/image_augmenter.h index b76b8da4650e..5a640bc97802 100644 --- a/src/io/image_augmenter.h +++ b/src/io/image_augmenter.h @@ -192,20 +192,20 @@ class ImageAugmenter { y /= 2; x /= 2; } cv::Rect roi(x, y, rand_crop_size, rand_crop_size); - cv::resize(res(roi), res, cv::Size(param_.data_shape[1], param_.data_shape[2])); + cv::resize(res(roi), res, cv::Size(param_.data_shape[2], param_.data_shape[1])); } else { - CHECK(static_cast(res.cols) >= param_.data_shape[1] - && static_cast(res.rows) >= param_.data_shape[2]) + CHECK(static_cast(res.rows) >= param_.data_shape[1] + && static_cast(res.cols) >= param_.data_shape[2]) << "input image size smaller than input shape"; - index_t y = res.rows - param_.data_shape[2]; - index_t x = res.cols - param_.data_shape[1]; + index_t y = res.rows - param_.data_shape[1]; + index_t x = res.cols - param_.data_shape[2]; if (param_.rand_crop != 0) { y = std::uniform_int_distribution(0, y)(*prnd); x = std::uniform_int_distribution(0, x)(*prnd); } else { y /= 2; x /= 2; } - cv::Rect roi(x, y, param_.data_shape[1], param_.data_shape[2]); + cv::Rect roi(x, y, param_.data_shape[2], param_.data_shape[1]); res = res(roi); } return res; From 0c99995ef584a82d00bffbb5273d43fc62a2e674 Mon Sep 17 00:00:00 2001 From: Yizhi Liu Date: Thu, 10 Dec 2015 22:43:09 +0800 Subject: [PATCH 2/5] remove duplicate var definition --- python/mxnet/ndarray.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/mxnet/ndarray.py b/python/mxnet/ndarray.py index 3485b9b240f9..235d50b4534d 100644 --- a/python/mxnet/ndarray.py +++ b/python/mxnet/ndarray.py @@ -568,7 +568,6 @@ def _make_ndarray_function(handle): NDARRAY_ARG_BEFORE_SCALAR = 1 ACCEPT_EMPTY_MUTATE_TARGET = 1 << 2 # Get the property of NDArray - n_mutate_vars = 0 n_used_vars = mx_uint() n_scalars = mx_uint() n_mutate_vars = mx_uint() From a08acc73af170051663176e910f2c457991769b7 Mon Sep 17 00:00:00 2001 From: "Yuan (Terry) Tang" Date: Thu, 10 Dec 2015 22:13:13 -0600 Subject: [PATCH 3/5] Additional installation instruction If we call `locate libgomp.dylib` directly without an existing local database, the following warning will appear: ``` WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist Please be aware that the database can take some time to generate; once the database has been created, this message will no longer appear. ``` --- doc/build.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/build.md b/doc/build.md index 1914b05e8c57..026e56311276 100644 --- a/doc/build.md +++ b/doc/build.md @@ -87,6 +87,8 @@ Some of the users might meet the link error `ld: library not found for -lgomp`, To resolve this issue, run the following commands: ``` +sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist # this creates the locate database if it does not exist + locate libgomp.dylib #copy the path which is generated by this command, say path1 ln -s path1 /usr/local/lib/libgomp.dylib From 2b09255d54f3f5507a9680741210d97dad23b5bd Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Fri, 11 Dec 2015 10:26:45 -0500 Subject: [PATCH 4/5] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7e1a6009b736..fcea6e51b46f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -81,3 +81,9 @@ List of Contributors * [nowozin](https://github.com/nowozin) * [Mathis](https://github.com/sveitser) * [sennendoko](https://github.com/sennendoko) +* [srand99](https://github.com/srand99) +* [Yizhi Liu](https://github.com/javelinjs) +* [Taiyun](https://github.com/taiyun) +* [Yanghao Li](https://github.com/lyttonhao) +* [Nan Zhu](https://github.com/CodingCat) +* [Ye Zhou](https://github.com/zhouye) From 841bd102f50ed5ebb807b83a5e2f2cc6ce0fcbc6 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Fri, 11 Dec 2015 10:29:08 -0500 Subject: [PATCH 5/5] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index fcea6e51b46f..8bd37bb75b9e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -87,3 +87,4 @@ List of Contributors * [Yanghao Li](https://github.com/lyttonhao) * [Nan Zhu](https://github.com/CodingCat) * [Ye Zhou](https://github.com/zhouye) +* [Zhang Chen](https://github.com/zhangchen-qinyinghua)