Created
May 26, 2021 02:59
-
-
Save eileen-code4fun/964face49bb32ec6b425558e640a511d to your computer and use it in GitHub Desktop.
CIFAR10 Model
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
from tensorflow.keras import layers, models, losses | |
def create_model(): | |
model = models.Sequential([ | |
layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)), | |
layers.MaxPooling2D(2, 2), | |
layers.Conv2D(64, (3, 3), activation='relu'), | |
layers.MaxPooling2D(2, 2), | |
layers.Conv2D(64, (3, 3), activation='relu'), | |
layers.Flatten(), | |
layers.Dense(64, activation='relu'), | |
layers.Dense(10, activation='softmax') | |
]) | |
model.compile(optimier='adam', loss=losses.SparseCategoricalCrossentropy(), metrics=['accuracy']) | |
return model | |
model = create_model() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
optimier should be optimizer