मैं कर रहा हूँ के बारे में उलझन में उत्पादन के आकार keras परत. मैं बनाया है एक नमूना keras मॉडल भी प्रदर्शित इसकी सारांश.
numberOfLSTMcells=1
n_timesteps_in=129
n_features=61
inp =Input(shape=(n_timesteps_in, n_features))
lstm= LSTM(numberOfLSTMcells,return_sequences=True, return_state=False) (inp)
fc=Dense(64,activation='relu',name='hidden_layer')(lstm)
out=Dense(1,activation='sigmoid',name='last_layer')(fc)
model = Model(inputs=inp, outputs=out)
सारांश के मॉडल
Model: "model_1"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_3 (InputLayer) [(None, 129, 61)] 0
_________________________________________________________________
lstm_2 (LSTM) (None, 129, 1) 252
_________________________________________________________________
hidden_layer (Dense) (None, 129, 64) 128
_________________________________________________________________
last_layer (Dense) (None, 129, 1) 65
=================================================================
Total params: 445
Trainable params: 445
Non-trainable params: 0
मैं क्या लगता है कि के आकार के अंतिम परत होना चाहिए (None,64,1)
. क्योंकि hidden_layers 64 न्यूरॉन्स चला जाता है, जो इनपुट के रूप में करने के लिए last_layer