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 2019/03/03 22:39:24 UTC

[GitHub] [incubator-mxnet] anirudhacharya commented on a change in pull request #14196: Group Normalization

anirudhacharya commented on a change in pull request #14196: Group Normalization
URL: https://github.com/apache/incubator-mxnet/pull/14196#discussion_r261891736
 
 

 ##########
 File path: tests/python/unittest/test_gluon.py
 ##########
 @@ -2587,6 +2587,21 @@ def hybrid_forward(self, F, x):
             net = Net(act0, act1, shape, slice)
             check_layer_forward_withinput(net, x)
 
+
+@with_seed()
+def test_groupnorm():
+    ctx=mx.context.current_context()
+    x = mx.nd.random.uniform(1, 2, (4, 16, 8, 8), ctx=ctx)
+    gn = mx.gluon.nn.GroupNorm(4, 16)
+    gn.initialize(ctx=ctx)
+    y = gn(x)
+    y = y.reshape(0, 4, -1)
+    print('y.mean(2) =', y.mean(2))
 
 Review comment:
   can we use logging.info instead of a print statement here?

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


With regards,
Apache Git Services