Week2 programming assignment2 exercise2

I got an error like: Tensor.op is meaningless when eager execution is enabled.
and I have no idea where is wrong? Can someone help me?
I mean I think I complete every step that I supposed to do.

Yes, we can try to help you, but you need to give us a bit more information than that. The first step would be to show us the full exception output that you get. That will give a bit more context than just stating the error message.

Sorry, I found it’s a long error message, And i post the one that directly related with my code and the last error message:

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

AttributeError: Tensor.op is meaningless when eager execution is enabled.

But the point is that does not show us the actual point at which the error occurs, which is why it is not helpful. Please show us the full trace, even if it is large.

Also note that you said this is Week 4 Assignment 2, but that is Neural Style Transfer. It looks like you are talking about the MobilNet Transfer Learning assignment. That is Week 2, right?

Yeah, sorry, I will correct it. And I was reading some questions other posted 18 hours ago and find their solution… Thanks for your help a lot!!!

Sorry, I’m not sure I understand. Do you mean that you have solved the problem you were asking about here? If so, that’s great news!

yeah, I get the solution, it’s a really silly error. like I forget type “(x)” after my code…

1 Like

Glad to hear you figured it out! Thanks for confirming.