hi, I tried to follow instructions exactly but I got strange errors, I’m not sure completely about that, specially the last lines,
Z1=tfl.Conv2D(8,(4,4), strides=(1, 1), padding=‘SAME’)(input_img)
A1=tfl.ReLU()(Z1)
P1=tfl.MaxPool2D(pool_size=(8, 8), strides=8, padding=‘SAME’)
P1(A1)
Z2=tfl.Conv2D(16,(2,2), strides=(1, 1), padding=‘SAME’)(P1)
A2=tfl.ReLU()(Z2)
P2=tfl.MaxPool2D(pool_size=(4, 4), strides=4, padding=‘SAME’)
P2(A2)
F=tfl.Flatten()
outputs = tfl.Dense(6, activation = ‘softmax’)
# YOUR CODE ENDS HERE
model = tf.keras.Model(inputs=input_img, outputs=outputs)
Hi reza,
maybe you need to specify P2 with F and F with outputs… like what you did for first few lines…
@reza1
I agree with @WendyW. Your P2 =… and F = … lines are missing (or use the wrong) the final (…) arguments.
Also, please edit your post and remove the code. Posting your code breaks the course Honor Code.
If you post your error messages, we can usually figure out what the problem is. Or you an find some clues by searching the forum for the function name you’re working on.
Posting your code is not allowed.