Transfer_learning_with_MobileNet_v1 Problem

Hello, I’ve been working hard on the homework in Transfer_learning_with_MobileNet_v1, and I’m stuck in this part.
{moderator edit - solution code removed}
and this is the test message.
AttributeError: ‘function’ object has no attribute ‘shape’
I would appreciate it if you can help me!!!

There is nothing wrong with those two lines of code.

Please post the entire assert stack including any error messages.

Also, be sure you have run all of the cells in the notebook before you start testing.

Thanks, here are my code, but I still can not find out where are the problems. :sob:

{moderator edit - solution code removed}

I did not ask you to post your code. That breaks the course Honor Code.

I asked to see the assert stack and any error messages.

In the first line, you need to complete the code that specifies the “weights=…” parameter.

1 Like

For those two lines, you have not provided a data argument.

1 Like

Exactly! That is what causes the particular error message you got. By the time you pass x to GlobalAvgPooling, it is a function instead of a tensor because of the mistake that Tom points out.