ImportError: No module named 'keras.utils.visualize_util'

Tensorflow 2:

from tensorflow.keras.utils import plot_model

You will have to either fix the code manually, or downgrade Keras.

By looking at the commit history of that module, you can see that it was renamed on February 28, 2017 from visualize_util to vis_utils. The plot function was also renamed to plot_model.

You will have to update the code to reflect these changes, or use a proper Keras version where the code you are using was developed or tested.


Use

from keras.utils import plot_model

instead