MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / HiddenLayer

Class HiddenLayer

airline/ann.py:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 return 1 - sse / sst
20
21class HiddenLayer(object):
22 def __init__(self, M1, M2, f, an_id):
23 self.id = an_id
24 self.M1 = M1
25 self.M2 = M2
26 self.f = f
27 W = init_weight(M1, M2)
28 b = np.zeros(M2)
29 self.W = theano.shared(W, 'W_%s' % self.id)
30 self.b = theano.shared(b, 'b_%s' % self.id)
31 self.params = [self.W, self.b]
32
33 def forward(self, X):
34 return self.f(X.dot(self.W) + self.b)
35
36
37class ANN(object):

Callers 1

fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected