This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 22b2897  Fixed a bug in image_det_aug_default.cc (#8099)
22b2897 is described below

commit 22b2897d23de44c696c7776a7a2ba1879be5eb2e
Author: Xiaoyu Tao <[email protected]>
AuthorDate: Sat Sep 30 01:39:51 2017 +0800

    Fixed a bug in image_det_aug_default.cc (#8099)
    
    A pair of brackets is missing when computing 1. / (new_scale * new_scale), 
which would cause an arithmetic error。
---
 src/io/image_det_aug_default.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/io/image_det_aug_default.cc b/src/io/image_det_aug_default.cc
index 7d15fac..1a11c05 100644
--- a/src/io/image_det_aug_default.cc
+++ b/src/io/image_det_aug_default.cc
@@ -483,7 +483,7 @@ class DefaultImageDetAugmenter : public ImageAugmenter {
     float min_ratio = std::max<float>(min_crop_aspect_ratio / img_aspect_ratio,
         new_scale * new_scale);
     float max_ratio = std::min<float>(max_crop_aspect_ratio / img_aspect_ratio,
-        1. / new_scale * new_scale);
+        1. / (new_scale * new_scale));
     float new_ratio = std::sqrt(std::uniform_real_distribution<float>(
         min_ratio, max_ratio)(*prnd));
     float new_width = std::min(1.f, new_scale * new_ratio);

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to