guanxinq commented on a change in pull request #17242: add RandomApply in 
gluon's transforms
URL: https://github.com/apache/incubator-mxnet/pull/17242#discussion_r363957815
 
 

 ##########
 File path: tests/python/unittest/test_gluon_data_vision.py
 ##########
 @@ -229,6 +229,21 @@ def test_transformer():
     transform(mx.nd.ones((245, 480, 3), dtype='uint8')).wait_to_read()
 
 
+@with_seed()
+def test_randomtransforms():
+    from mxnet.gluon.data.vision import transforms
+
+    transform = 
transforms.Compose([transforms.RandomApply(transforms.Compose([transforms.Resize(300),
 transforms.RandomResizedCrop(224)]), 0.5)])
+    
+    img = mx.nd.ones((245, 480, 3), dtype='uint8')
 
 Review comment:
   It may be not necessary. The test here is to check the frequency of the 
composed transforms applied. Also, in the new PR, I will reduce the img 
dimension. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to