-
-
Save afozbek/52ba850c9f3a333cb9adf29218d05c44 to your computer and use it in GitHub Desktop.
med
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 create_model(): | |
model = Sequential() | |
model.add(Dense(10, input_dim = num_pixels, #num_pixels: 784 | |
activation = 'relu')) | |
model.add(Dense(30, activation='relu')) | |
model.add(Dense(10, activation='relu')) | |
model.add(Dense(num_of_classes, activation='softmax')) | |
model.compile(Adam(lr=0.01), #lr: learning rate | |
loss='categorical_crossentropy', #loss function | |
metrics=['accuracy']) | |
return model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment