When functional model is used, the api does not recognize input layer.
ere is code
`import keras;
from keras.layers import Input, Dense
from keras.models import Model
This returns a tensor
inputs = Input(shape=(784,))
a layer instance is callable on a tensor, and returns a tensor
When functional model is used, the api does not recognize input layer. ere is code `import keras; from keras.layers import Input, Dense from keras.models import Model
This returns a tensor
inputs = Input(shape=(784,))
a layer instance is callable on a tensor, and returns a tensor
l1 = Dense(units=800,kernel_initializer=keras.initializers.Ones(), activation='relu')(inputs) l2 = Dense(units=800,kernel_initializer=keras.initializers.Ones(), activation='relu')(l1) lo = Dense(10, activation='softmax')(l2)
This creates a model that includes
the Input layer and three Dense layers
model = Model(inputs=inputs, outputs=lo) model.compile(optimizer='rmsprop', loss='categorical_crossentropy', metrics=['accuracy'])
from ann_visualizer.visualize import ann_viz;
ann_viz(model, title="");`