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

Class DoubleLinear

test/python/test_model.py:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37
38class DoubleLinear(layer.Layer):
39
40 def __init__(self, a, b, c):
41 super(DoubleLinear, self).__init__()
42 self.l1 = layer.Linear(a, b)
43 self.l2 = layer.Linear(b, c)
44
45 def forward(self, x):
46 y = self.l1(x)
47 y = self.l2(y)
48 return y
49
50
51class MyModel(model.Model):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

__init__Method · 0.68