using a tf.Tensor as a Python bool is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function.
This is my error when i am executing convolution_model function.
Can someone please help with this?
Below is the part of my code:
Z1 = tf.keras.layers.Conv2D(filters= 8 , kernel_size= (4,4) ,strides = (1,1), padding='same')(input_img)
A1 = tf.keras.layers.ReLU(Z1)
P1 = tf.keras.layers.MaxPool2D(A1, pool_size=(8, 8), strides=(8,8), padding='same')
Z2 = tf.keras.layers.Conv2D(filters= 16 , kernel_size= (2,2), strides = (1,1) , padding='same')(P1)
A2 = tf.keras.layers.ReLU(Z2)
P2 = tf.keras.layers.MaxPool2D(A2, pool_size=(4, 4), strides=(4,4), padding='same')
F = tf.keras.layers.Flatten(P2)
outputs = tf.keras.layers.Dense(units=6, activation='softmax')(F)