MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

test/python/test_model.py:53–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51class MyModel(model.Model):
52
53 def __init__(self):
54 super(MyModel, self).__init__()
55 self.conv1 = layer.Conv2d(2, 2)
56 self.bn1 = layer.BatchNorm2d(2)
57 self.doublelinear1 = DoubleLinear(2, 4, 2)
58 self.optimizer = opt.SGD()
59
60 def forward(self, x):
61 y = self.conv1(x)

Callers

nothing calls this directly

Calls 2

DoubleLinearClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected