Keras documentation: Image data loading
Keras documentation: The Sequential model
model = keras.Sequential(name="my_sequential")
model.add(keras.Input(shape=(4,)))
model.add(layers.Dense(2, activation="relu", name="layer1"))
model.add(layers.Dense(3, activation="relu", name="layer2"))
model.add(layers.Dense(4, name="layer3"))
model = Sequential([
Conv2D(filters=32, kernel_size=(5,5), activation='relu', input_shape=(28,28,3)),
Conv2D(filters=64, kernel_size=(5,5), activation='relu'),
Conv2D(filters=128, kernel_size=(3,3), strides=(2,2), activation='relu'),
MaxPooling2D(pool_size=(2,2)),
Dropout(0.25),
Flatten(),
Dense(units=128, activation='relu'),
Dropout(0.5),
Dense(units=33, activation='softmax')
])
return model
# Create the model
model = custom_model()
model.summary()
Keras documentation: Working with preprocessing layers
tf.keras.layers.Rescaling(scale, offset=0.0, **kwargs)