MCPcopy
hub / github.com/dmlc/dgl / MyMod

Class MyMod

tests/python/mxnet/test_nn.py:857–867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855
856 # test with mod args
857 class MyMod(mx.gluon.nn.Block):
858 def __init__(self, s1, s2):
859 super(MyMod, self).__init__()
860 self.carg1 = 0
861 self.s1 = s1
862 self.s2 = s2
863
864 def forward(self, g, h, arg1=None): # mxnet does not support kwargs
865 if arg1 is not None:
866 self.carg1 += 1
867 return F.zeros((g.number_of_dst_nodes(), self.s2))
868
869 mod1 = MyMod(2, 3)
870 mod2 = MyMod(2, 4)

Callers 1

test_hetero_convFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_hetero_convFunction · 0.56