MCPcopy Create free account
hub / github.com/MorvanZhou/tutorials / __init__

Method __init__

theanoTUT/theano12_regularization/full_code.py:19–27  ·  view source on GitHub ↗
(self, inputs, in_size, out_size, activation_function=None)

Source from the content-addressed store, hash-verified

17
18class Layer(object):
19 def __init__(self, inputs, in_size, out_size, activation_function=None):
20 self.W = theano.shared(np.random.normal(0, 1, (in_size, out_size)))
21 self.b = theano.shared(np.zeros((out_size, )) + 0.1)
22 self.Wx_plus_b = T.dot(inputs, self.W) + self.b
23 self.activation_function = activation_function
24 if activation_function is None:
25 self.outputs = self.Wx_plus_b
26 else:
27 self.outputs = self.activation_function(self.Wx_plus_b)
28
29
30def minmax_normalization(data):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected