Вот код, только часть модели:
import tensorflow as tf
from tensorflow.keras import Conv2D, Dense, Flatten, MaxPool2D
# Declare your desired things here
num_filter=32
kernel_size=(3,3)
strides=(1,1)
padding="valid"
input_shape=(width,height,channel)
model = tf.keras.Sequential([
Conv2D(num_filter, kernel_size, strides=strides, input_shape=input_shape),
MaxPool2D(),
Flatten(),
Dense(4, activation="softmax")
])
Вот полезная ссылка: Con vNet TensorFlow guide