Created
November 14, 2016 02:08
-
-
Save nickmitchko/c9e9b7c6f07db3b66fb5534102f06b23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
network = NeuralNet( | |
layers=[('input', layers.InputLayer), | |
('conv2d1', layers.Conv2DLayer), | |
('maxpool1', layers.MaxPool2DLayer), | |
('conv2d2', layers.Conv2DLayer), | |
('maxpool2', layers.MaxPool2DLayer), | |
('dropout1', layers.DropoutLayer), | |
('dense', layers.DenseLayer), | |
('dropout2', layers.DropoutLayer), | |
('output', layers.DenseLayer), | |
], | |
# input layer | |
input_shape=(1, self.width, self.height), | |
# layer conv2d1 | |
conv2d1_num_filters=32, | |
conv2d1_filter_size=(5, 5), | |
conv2d1_nonlinearity=lasagne.nonlinearities.rectify, | |
conv2d1_W=lasagne.init.GlorotUniform(), | |
# layer maxpool1 | |
maxpool1_pool_size=(2, 2), | |
# layer conv2d2 | |
conv2d2_num_filters=32, | |
conv2d2_filter_size=(5, 5), | |
conv2d2_nonlinearity=lasagne.nonlinearities.rectify, | |
# layer maxpool2 | |
maxpool2_pool_size=(2, 2), | |
# dropout1 | |
dropout1_p=0.5, | |
# dense | |
dense_num_units=256, | |
dense_nonlinearity=lasagne.nonlinearities.rectify, | |
# dropout2 | |
dropout2_p=0.5, | |
# output | |
output_nonlinearity=lasagne.nonlinearities.softmax, | |
output_num_units=7, | |
# optimization method params | |
regression=False, | |
update=nesterov_momentum, | |
update_learning_rate=0.01, | |
update_momentum=0.9, | |
max_epochs=10, | |
verbose=1, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment