Skip to content

Instantly share code, notes, and snippets.

@securetorobert
Created October 1, 2020 17:14
Show Gist options
  • Save securetorobert/c12c34e310245130b9d95854351df07a to your computer and use it in GitHub Desktop.
Save securetorobert/c12c34e310245130b9d95854351df07a to your computer and use it in GitHub Desktop.
LeNet model definition
model = models.Sequential([
layers.Conv2D(filters=6, kernel_size=(5,5), strides=1, activation='tanh', input_shape=(HEIGHT, HEIGHT, NUM_CHANNELS)),
layers.AveragePooling2D(pool_size=(2,2)),
layers.Conv2D(filters=16, kernel_size=(5,5), strides=1, activation='tanh'),
layers.AveragePooling2D(pool_size=(2,2)),
layers.Flatten(),
layers.Dense(120),
layers.Dense(84),
layers.Dense(NCLASSES, activation='softmax')
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment