C3_W4_Lab_2: Error importing keras.utils.plot_model

Hi,

In lab 2 I found an error when importing “plot_model”. Some Google searching suggests that this should be:
from keras.utils.vis_utils import plot_model

And indeed that appears to work.

Quentin

Hi @dqmcdonald,

Had you checked the tensorflow version? Depending on that, what works or not changes :confused:
I know it is quite confusing!!
Hope this helps!

Hi @thearkamitra

Yes, it’s running TensorFlow 2.6.0. Everything else seems to work fine with that version and plot_model isn’t even referenced anywhere. Just seems weird that one of the labs isn’t working in its default state.

Thanks,

Quentin

Hi @dqmcdonald,

The Lab was tested with TF 2.5.0, which at the time was the latest version. If something is not working in the labs, please downgrade it to TF 2.5.0

Thanks,
Mubsi

Hi @Mubsi ,

It’s actually easier to just update the import line (or comment it out as it doesn’t seem to be needed).

Since this is ungraded I don’t think it matters much and the results look reasonable with 2.6.0.

Quenitn