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

Method __init__

examples/msmlp/model.py:86–95  ·  view source on GitHub ↗
(self, data_size=10, perceptron_size=100, num_classes=10)

Source from the content-addressed store, hash-verified

84class MSMLP(model.Model):
85
86 def __init__(self, data_size=10, perceptron_size=100, num_classes=10):
87 super(MSMLP, self).__init__()
88 self.num_classes = num_classes
89 self.dimension = 2
90
91 self.relu = layer.ReLU()
92 self.linear1 = layer.Linear(perceptron_size)
93 self.linear2 = layer.Linear(num_classes)
94 self.softmax_cross_entropy = layer.SoftMaxCrossEntropy()
95 self.sum_error = SumErrorLayer()
96
97 def forward(self, inputs):
98 y = self.linear1(inputs)

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

SumErrorLayerClass · 0.70

Tested by

no test coverage detected