I have the following situation
class SomeClass():
def foo(self, X, y):
self.model.add(tf.keras.layers.Conv2D(64, (3, 3), activation='relu', input_shape=(640, 480, 3))
self.model.add(tf.keras.layers.MaxPooling2D(2,2)) # 1
self.model.add(tf.keras.layers.Conv2D(128, (3, 3), activation='relu')
self.model.add(tf.keras.layers.MaxPooling2D(2,2)) # 2
Now I would like to add 1 and 2 and to pass this to next layer in my DNN. I have tried everything, but every time I get problem with KerasTensor & Layer class. It says it needs to be subclass of Layer, when I do that I still get the same error.
I have tried everything.