You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/11/08 02:30:19 UTC

[GitHub] [incubator-mxnet] szha commented on a change in pull request #18690: Optimize graph execution in presence of dynamic shape op

szha commented on a change in pull request #18690:
URL: https://github.com/apache/incubator-mxnet/pull/18690#discussion_r519246942



##########
File path: tests/python/unittest/test_dynamic_shape.py
##########
@@ -47,3 +47,26 @@ def hybrid_forward(self, F, data, index):
     assert_almost_equal(result.asnumpy(), result_nd)
     assert_almost_equal(data.grad.asnumpy(), data_grad_nd)
 
+def test_dynamic_shape_with_reshape():
+    # test dynamic shape op followed by reshape op
+    class _TestBlock(gluon.HybridBlock):
+
+        def __init__(self):
+            super(_TestBlock, self).__init__()
+
+        def hybrid_forward(self, F, data, index):
+            return F.contrib.boolean_mask(data, index).reshape((-1, ))

Review comment:
       let's also add test cases for deferred compute based implementation.




----------------------------------------------------------------
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:
users@infra.apache.org