Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akash-ch2812/e7bdb749aa7c4e92303b656b09abdf85 to your computer and use it in GitHub Desktop.
Save akash-ch2812/e7bdb749aa7c4e92303b656b09abdf85 to your computer and use it in GitHub Desktop.
# adding a flatten layer to CNN
cnn.add(tf.keras.layers.Flatten())
# adding fully connected layers
cnn.add(tf.keras.layers.Dense(128, activation='relu'))
cnn.add(tf.keras.layers.Dense(64, activation='relu'))
# output layer -> 6 Neurons for 6 different classes
# activation function used for multiclass classification is softmax, for binary use sigmoid as activation fxn
cnn.add(tf.keras.layers.Dense(6, activation='softmax'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment