-1

I am new to AI, i am trying to understand the concept of perceptron, hidden layers, MLP etc.

in below code i want to understand how many total layers we have including input and output, number of hidden layers

embed_layer = Embedding(vocab_size,embed_dim,weights = 
[embedding_matrix],trainable=trainable_param)

input_seq = Input(shape=(X_train_pad.shape[1],))
embed_seq = embed_layer(input_seq)
x = Dense(256,activation ="relu")(embed_seq)
x = Flatten()(x)
preds = Dense(1,activation="sigmoid")(x)

model = Model(input_seq,preds)

below is the summary of the model

Model summary with layers output details

James Z
  • 12,209
  • 10
  • 24
  • 44
Kevin
  • 21
  • 6

1 Answers1

0

You can find a nice example how to interpret the summary here: https://machinelearningmastery.com/visualize-deep-learning-neural-network-model-keras/

In your case you have the input layer (that basically only reshape your input), 3 hidden layers (embedding_5-dense_9-flatten_5) and the output layer (dense_10).

Roberto
  • 745
  • 4
  • 19