The base_model scope in Assignment Transfer_learning_with_MobileNet_v1

Hey there,

I’m just curious about the variable base_model. As I know this variable is a global one and the model2 which is created in alpaca_model is built by a local variable base_model inside alpaca_model.

Sub-exercise 3.3 is to fine-tuning the model and the base_model should be adjusted and being tuned, which is however a global variable.

How does the change of this global base_model impact the model2 after tuning?

Am I wrong or missing the syntax of Python?

Hi Chris.X,

Good catch!

I’ll notify the people at the backend.


Does it mean that in 3.3 fine tune section we should worked on a copy of model2 instead of directly on it?

Hi yc2984,

In the current version of the assignment, this bug is resolved by the inclusion of the statement base_model = model2.layers[4] in Exercise 3.