Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Model' object has no attribute 'container_nodes' #14542

Closed
SnowWalkerJ opened this issue Nov 14, 2017 · 1 comment · Fixed by #14553
Closed

'Model' object has no attribute 'container_nodes' #14542

SnowWalkerJ opened this issue Nov 14, 2017 · 1 comment · Fixed by #14553
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:bug Bug

Comments

@SnowWalkerJ
Copy link

Problem

model = tf.keras.models.Model()
model.add(...)
tf.keras.utils.plot_model(model, to_file="model.png")

Output:

Traceback (most recent call last):
  File "model.py", line 36, in <module>
    K.utils.plot_model(model, to_file="model.png")
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/_impl/keras/utils/vis_utils.py", line 148, in plot_model
    dot = model_to_dot(model, show_shapes, show_layer_names, rankdir)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/_impl/keras/utils/vis_utils.py", line 123, in model_to_dot
    if node_key in model.container_nodes:
AttributeError: 'Model' object has no attribute 'container_nodes'

Environment

-System: Ubuntu 16.04
-Tensorflow-gpu bin v1.4.0-rc1-11-g130a514 1.4.0

@qmick
Copy link
Contributor

qmick commented Nov 14, 2017

model_to_dot() does not work since commit 3599fd4. A minor fix seems works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower type:bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants