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

Class HiddenLayer

cnn_class/cifar.py:70–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69
70class HiddenLayer(object):
71 def __init__(self, M1, M2, an_id):
72 self.id = an_id
73 self.M1 = M1
74 self.M2 = M2
75 W, b = init_weight_and_bias(M1, M2)
76 self.W = theano.shared(W, 'W_%s' % self.id)
77 self.b = theano.shared(b, 'b_%s' % self.id)
78 self.params = [self.W, self.b]
79
80 def forward(self, X):
81 return T.nnet.relu(X.dot(self.W) + self.b)
82
83
84class ConvPoolLayer(object):

Callers 1

fitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected