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

Class HiddenLayer

ann_class2/batch_norm_theano.py:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83class HiddenLayer(object):
84 def __init__(self, M1, M2, f):
85 self.M1 = M1
86 self.M2 = M2
87 self.f = f
88 W = init_weight(M1, M2)
89 b = np.zeros(M2)
90 self.W = theano.shared(W)
91 self.b = theano.shared(b)
92 self.params = [self.W, self.b]
93
94 def forward(self, X):
95 return self.f(X.dot(self.W) + self.b)
96
97
98def momentum_updates(cost, params, lr, mu):

Callers 1

fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected