Created
August 24, 2021 18:28
-
-
Save siddharthganjoo/5ffbb70d00cd4e7b805f240a3d12fe60 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
#import library for model making | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Conv2D, MaxPooling2D | |
from tensorflow.keras.layers import Activation, Dropout, Flatten, Dense | |
from tensorflow.keras import regularizers | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Dense | |
import warnings | |
#classifier model making | |
classifier = Sequential() | |
# add input layer and hidden layer | |
classifier.add(Dense( | |
activation="relu", input_dim=21, units=12, | |
kernel_initializer="normal",kernel_regularizer=regularizers.l2(0.001) | |
)) | |
classifier.add(Dropout(0.2)) | |
# Adding the output layer | |
classifier.add(Dense(activation="softmax", units=2)) | |
classifier.save_weights("weights") | |
#printing parameters | |
classifier.summary() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment