I used the next command:
print(type(model))
Then it return: 'keras.models.Sequential'
And I found that in visulize_util.py: if type(model) == Squeential
Is type(model) == Squeential?
or should I add 'from keras.models import Sequential, Graph' in visulize_util.py.
I don't get what your problem is. Does
from keras.utils.visualize_util import to_graph
from keras.models import Sequential
to_graph(Sequential())
work for you?
And yes, indeed:
>>> type(Sequential()) == Sequential
True
I am also getting the same issue regarding the "Global name sequential is not defined even i am importing model from keras also I am getting the error. While using the keras model in the code.
model = Sequential()
Most helpful comment
I don't get what your problem is. Does
work for you?
And yes, indeed: