Created
November 8, 2016 17:27
-
-
Save MattChanTK/79d5965f03f46e4bd0850fbc65cd0023 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def create_convolutional_neural_network(input_vars, out_dims, dropout_prob=0.0): | |
| convolutional_layer_1 = Convolution((5, 5), 32, strides=1, activation=cntk.ops.relu, pad=True, init=gaussian(), init_bias=0.1)(input_vars) | |
| pooling_layer_1 = MaxPooling((2, 2), strides=(2, 2), pad=True)(convolutional_layer_1) | |
| convolutional_layer_2 = Convolution((5, 5), 64, strides=1, activation=cntk.ops.relu, pad=True, init=gaussian(), init_bias=0.1)(pooling_layer_1) | |
| pooling_layer_2 = MaxPooling((2, 2), strides=(2, 2), pad=True)(convolutional_layer_2) | |
| fully_connected_layer = Dense(1024, activation=cntk.ops.relu, init=gaussian(), init_bias=0.1)(pooling_layer_2) | |
| dropout_layer = Dropout(dropout_prob)(fully_connected_layer) | |
| output_layer = Dense(out_dims, activation=None, init=gaussian(), init_bias=0.1)(dropout_layer) | |
| return output_layer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment