-
-
Save IamRash-7/8cbc78f6466ec8cdb060f1a163b4696a 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
def model(): | |
model = Sequential() | |
model.add(Conv2D(128, (3, 3), input_shape=x_train.shape[1:])) | |
model.add(LeakyReLU(alpha=0.02)) | |
model.add(MaxPooling2D(pool_size=(2, 2))) | |
model.add(Dropout(0.25)) | |
model.add(Conv2D(128, (3, 3))) | |
model.add(LeakyReLU(alpha=0.02)) | |
model.add(MaxPooling2D(pool_size=(2, 2))) | |
model.add(Dropout(0.25)) | |
model.add(GlobalMaxPooling2D()) | |
model.add(Dense(512)) | |
model.add(LeakyReLU(alpha=0.02)) | |
model.add(Dropout(0.5)) | |
model.add(Dense(10)) | |
model.add(Activation('softmax')) | |
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) | |
return model | |
model = model() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment