Skip to content

Instantly share code, notes, and snippets.

@eileen-code4fun
Created May 26, 2021 02:59
Show Gist options
  • Save eileen-code4fun/964face49bb32ec6b425558e640a511d to your computer and use it in GitHub Desktop.
Save eileen-code4fun/964face49bb32ec6b425558e640a511d to your computer and use it in GitHub Desktop.
CIFAR10 Model
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()
@MarCialRG
Copy link

optimier should be optimizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment