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

Method __init__

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

Source from the content-addressed store, hash-verified

88class MSMLP(model.Model):
89
90 def __init__(self, data_size=10, perceptron_size=100, num_classes=10):
91 super(MSMLP, self).__init__()
92 self.num_classes = num_classes
93 self.dimension = 2
94
95 self.relu = layer.ReLU()
96 self.linear1 = layer.Linear(perceptron_size)
97 self.linear2 = layer.Linear(num_classes)
98 self.softmax_cross_entropy = layer.SoftMaxCrossEntropy()
99 self.sum_error = SumErrorLayer()
100
101 def forward(self, inputs):
102 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