I'm trying to visualize my Deep Learning model using visual keras, but i am getting an error which i am not sure i understand. This is my first time using visual keras, and i am not sure what to do. As an example
!pip install visual keras
import visualkeras
import tensorflow as tf
tf.keras.utils.plot_model(model, show_shapes=True)
input = tf.keras.Input(shape=(100,), dtype='int32', name='input')
x = tf.keras.layers.Embedding(output_dim=512, input_dim=10000, input_length=100)(input)
x = tf.keras.layers.LSTM(32)(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
x = tf.keras.layers.Dense(64, activation='relu')(x)
output = tf.keras.layers.Dense(1, activation='sigmoid', name='output')(x)
model = tf.keras.Model(inputs=[input], outputs=[output])
visualkeras.layered_view(model, legend=True, draw_volume=False)
and the error looks like this TypeError: 'int' object is not iterable
. Any help will be much appreciated.
CodePudding user response: