Is there anything i am missing in the Word Embedding RNN here, output shape is “?” and params is ‘0″ why is this?

  Kiến thức lập trình

from keras.models import Sequential
from keras.layers import Embedding, SimpleRNN, Dense

model = Sequential()
model.add(Embedding(input_dim=10000, output_dim=50, input_length=50)) # input_length=50 is the length of input sequences
model.add(SimpleRNN(32)) # 32 units in the RNN
model.add(Dense(1, activation=’sigmoid’)) # Output layer for binary classification

model.compile(loss=’binary_crossentropy’, optimizer=’adam’, metrics=[‘accuracy’])

this is the code snippet I am using, I am not able to figure out why the params are coming as zero and the output shape as “?”
enter image description here

I even tried to change the code snippet to this, still got the same output.

from keras.models import Sequential
from keras.layers import Embedding, SimpleRNN, Dense

LAYERS = [
Embedding(input_dim=10000, output_dim=50, input_length=50, name=”embeddingLayer”), # input_length=50 is the length of input sequences
SimpleRNN(32, name=”simpleRNNLayer”), # 32 units in the RNN
Dense(1, activation=’sigmoid’, name=”outputLayer”) # Output layer for binary classification]
model = Sequential(LAYERS)
model.compile(loss=’binary_crossentropy’, optimizer=’adam’, metrics=[‘accuracy’])

model.summary()enter image description here

there shuould be some value for params and outputshape.

New contributor

Arjun Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT