Created
April 7, 2020 12:21
-
-
Save mihirkhandekar/57d615733c96926839829125b80a9dcb 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 classification_nn_model(input_features): | |
initializer = tf.compat.v1.keras.initializers.random_normal(0.0, 0.01) | |
model = tf.keras.Sequential( | |
[ | |
keraslayers.Dense( | |
512, | |
activation = tf.nn.tanh, | |
input_shape = (input_features,), | |
kernel_initializer = initializer, | |
bias_initializer = 'zeros' | |
), | |
keraslayers.Dense( | |
128, | |
activation=tf.nn.tanh, | |
kernel_initializer = initializer, | |
bias_initializer='zeros' | |
), | |
keraslayers.Dense( | |
32, | |
activation=tf.nn.tanh, | |
kernel_initializer = initializer, | |
bias_initializer='zeros' | |
), | |
keraslayers.Dense( | |
100, | |
kernel_initializer = initializer, | |
bias_initializer='zeros' | |
) | |
] | |
) | |
return model | |
# input_features should be changed according to the model | |
input_features = 600 | |
cmodelA = classification_nn_model(input_features) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment