ฉันหน่อสับสนเรื่องผลส่งออกรูปร่างของ 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)
. Becuase hidden_layers มี 64 เซลล์ประสาทซึ่งนั่นก็เป็นข้อมูลเพื่อ last_layer