0
>>> from tensorflow.keras.applications import VGG16
>>> from tensorflow.keras.utils import plot_model
>>> plot_model(VGG16, to_file="vgg16.png", show_shapes=True)

AttributeError: 'function' object has no attribute '_is_graph_network'

I tried changing show_shapes=False, but the same error appears. I was able to get the program run for custom made models.

1 Answer 1

1

tensorflow.keras.applications.VGG16 is a function that you need to call to get a keras.Model instance. See https://www.tensorflow.org/api_docs/python/tf/keras/applications/VGG16.

Something that would work :

from tensorflow.keras.applications import VGG16
from tensorflow.keras.utils import plot_model

plot_model(VGG16())
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.