This problem has been encountered a lot recently. Here’s what the template code looks like that was given to you in the alpaca_model function:
### START CODE HERE
base_model_path="imagenet_base_model/without_top_mobilenet_v2_weights_tf_dim_ordering_tf_kernels_1.0_160_no_top.h5"
base_model = tf.keras.applications.MobileNetV2(input_shape=None,
include_top=None, # <== Important!!!!
weights=base_model_path)
# freeze the base model by making it non trainable
base_model.trainable = None
If when you fill in the code, you also rewrite it to look like this, then you’ll get that error from the grader:
### START CODE HERE
base_model_path="imagenet_base_model/without_top_mobilenet_v2_weights_tf_dim_ordering_tf_kernels_1.0_160_no_top.h5"
base_model = tf.keras.applications.MobileNetV2(input_shape=None,
include_top=None, # <== Important!!!!
weights=base_model_path
)
# freeze the base model by making it non trainable
base_model.trainable = None
Please check your code and if you’ve done it that way, restore the close paren to be at the end of the previous line.
You’re right that your syntax is supported by python, but it causes problems for the grader and there’s no reason why you need to do it that way.
If that’s not what’s going on in your case, please let us know.