Keras: Unexpected keyword argument 'expand_nested'

Created on 27 Jan 2019  路  5Comments  路  Source: keras-team/keras

I have a model composed of nested models. I'm trying to use expand_nested to visualize the sub-models but get this error. I'm using keras 2.2.4.

TypeError: plot_model() got an unexpected keyword argument 'expand_nested'

I've seen this work for other users, do I have the wrong version of keras or is this a bug with the current release?

from keras.utils import plot_model
plot_model(model, to_file='file_name.png', expand_nested=True)

support

Most helpful comment

I have Keras 2.2.4 and have this issue as well

All 5 comments

Try to download keras from https://github.com/keras-team/keras and then using [keras] folder from GIT tree to replace what in Pyhton installation folder, such as Python36\Lib\site-packages\keras.

I also have this issue.

We shouldn't need to mess around with the Python packages to solve this - what's the root cause?

Has the pip package not been updated correctly?

This remains an issue.

I have Keras 2.2.4 and have this issue as well

Looking in the 2.2.4 source code this argument is not present at all. Would be a nice option certainly.

EDIT: looks like its fixed in this commit 3 days ago https://github.com/keras-team/keras/commit/f69e046eef93af5a28de5330bfe15ee348520b2d

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amityaffliction picture amityaffliction  路  3Comments

LuCeHe picture LuCeHe  路  3Comments

NancyZxll picture NancyZxll  路  3Comments

kylemcdonald picture kylemcdonald  路  3Comments

harishkrishnav picture harishkrishnav  路  3Comments