Assignment C3W2 Zombie Detector Exercise1: ModuleNotFoundError

Hello Tutors,

all stuff has been correctly loaded. Once I try to import the modules in the first exercise, I got this error: I suppose is not due false names I gave but something wrong in the colab before. Please advice!
Thank you,
Marco

ModuleNotFoundError Traceback (most recent call last)

/usr/local/lib/python3.7/dist-packages/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py in ()
34 try:
—> 35 from official.legacy.image_classification.efficientnet import efficientnet_model
36 except ModuleNotFoundError:

ModuleNotFoundError: No module named ‘official.legacy’

During handling of the above exception, another exception occurred:

ModuleNotFoundError Traceback (most recent call last)

5 frames

/usr/local/lib/python3.7/dist-packages/official/vision/image_classification/augment.py in ()
29 from typing import Any, Dict, List, Optional, Text, Tuple
30
—> 31 from tensorflow.python.keras.layers.preprocessing import image_preprocessing as image_ops
32
33 # This signifies the max integer that the controller RNN could predict for the

ModuleNotFoundError: No module named ‘tensorflow.python.keras.layers.preprocessing’

Hi Marco! Thank you for reporting! There was a bug in the install script because Colab updated its tensorflow version to TF2.8 . With that, we modified the setup.py in the Installation section to have these required packages:

REQUIRED_PACKAGES = [
    'tf-models-official==2.8.0',
    'tensorflow_io'
]

That should get rid of that error. Please re-open the notebook from the classroom to see the change or you can just edit it in your notebook if you have it saved already. It’s just one line anyway. Hope this helps!