I'm using TF 2.10.0 with python 3.10.8 and running into
TypeError: The added layer must be an instance of class Layer. Received: layer=<class 'keras.layers.pooling.max_pooling2d.MaxPooling2D'> of type <class 'type'>.
I referred to this >https://stackoverflow.com/questions/56089489/how-to-fix-the-added-layer-must-be-an-instance-of-class-layer-while-building-a article to try and fix it but no luck
Here's my code. Please tell me what I'm doing wrong
import tensorflow.keras.layers as layers
from tensorflow.keras.models import Sequential
import numpy as np
import PIL
model = Sequential([
layers.Rescaling(1./255, input_shape=(img_height, img_width, 3)),
layers.Conv2D(16, 3, padding='same', activation='relu'),
layers.MaxPool2D(),
layers.Conv2D(32, 3, padding='same', activation='relu'),
layers.MaxPool2D,
layers.Conv2D(64, 3, padding='same', activation='relu'),
layers.MaxPool2D(),
layers.Flatten(),
layers.Dense(128, activation='relu'),
layers.Dense(num_classes, name='output')
])
Please help :)