Here’s the way that code was given to you in the clean notebook:
### 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)
All you need to do is fill in the two “None” values with the correct values, but why did you modify the way that the pathname logic works? It may well be that your code is equivalent, but a) there was no need to do that and b) the evidence suggests that what you wrote is actually not equivalent.
I think the next logical step would be to get a clean notebook and start over again. You may be able to copy some of your work from the current version, but please use care in making those choices. Here’s a thread about how to get a clean copy.
Please try that and let us know if that helps or not.