W2 assignment 2 debugging

I got the following error message from running
model2 = alpaca_model(IMG_SIZE, data_augmentation):


TypeError Traceback (most recent call last)
in
----> 1 model2 = alpaca_model(IMG_SIZE, data_augmentation)

in alpaca_model(image_shape, data_augmentation)
46 ### END CODE HERE
47
—> 48 outputs = prediction_layer(x)
49 model = tf.keras.Model(inputs, outputs)
50

TypeError: ‘Tensor’ object is not callable

How can I tell what went wrong?

I think i figured it out, it was the
prediction_layer = … line, where it shouldn’t have (x) at the end

because the (x) should be in outputs=predictrion_layer(x)

I agree. To be consistent with all the other exercises, that line should have been defined as:

outputs = tfl.Dense(1)(x)