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

Class HiddenLayer

rnn_class/mlp_parity.py:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class HiddenLayer(object):
19 def __init__(self, M1, M2, an_id):
20 self.id = an_id
21 self.M1 = M1
22 self.M2 = M2
23 W = init_weight(M1, M2)
24 b = np.zeros(M2)
25 self.W = theano.shared(W, 'W_%s' % self.id)
26 self.b = theano.shared(b, 'b_%s' % self.id)
27 self.params = [self.W, self.b]
28
29 def forward(self, X):
30 return T.nnet.relu(X.dot(self.W) + self.b)
31
32
33class ANN(object):

Callers 1

fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected