ChaiBapchya commented on a change in pull request #15528: Add AMP Conversion 
support for BucketingModule
URL: https://github.com/apache/incubator-mxnet/pull/15528#discussion_r309975030
 
 

 ##########
 File path: tests/python/gpu/test_contrib_amp.py
 ##########
 @@ -300,10 +303,42 @@ def check_amp_convert_hybrid_block():
         params = converted_model.collect_params()
         assert params["stage2_unit1_conv2_weight"].dtype == np.float16
 
+
+    def check_amp_convert_bucketing_module():
+        model = train_model(context=mx.current_context())
+        result_model = amp.convert_bucketing_module(model)
+        val_sent = []
+        batch_size = 128
+        invalid_label = -1
+        num_sentence = 1000
+        buckets = [5, 10, 20, 30, 40]
+        len_vocab = 50
+
+        for _ in range(num_sentence):
+            len_sentence = randint(6, max(buckets)-1) # leave out the two last 
buckets empty
 
 Review comment:
   Why are the last two buckets left empty?

----------------------------------------------------------------
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