Cannot import name 'np_utils' from 'keras.utils'

I get this error while working on image-classifier dnn on the computer vision course

ImportError: cannot import name ‘np_utils’ from ‘keras.utils’ (/usr/local/lib/python3.10/dist-packages/keras/utils/init.py)

From a Terminal try: pip install np_utils

1 Like

Hi @kevinprasetyo,

It looks like np_utils has been removed from the keras.utils package. I updated that example for the course, which should work now: https://github.com/ShawnHymel/computer-vision-with-embedded-machine-learning/blob/master/1.2.3%20-%20Training%20an%20Image%20Classifier%20with%20Keras/image_classifier_dnn.ipynb.