I have this model structure and want to know the formula for calculating the parameters count in the GRU layer. I did not find that in the docs.
model = Sequential()
model.add(layers.GRU(32, input_shape=(None, float_data_1.shape[-1])))
model.add(layers.Dense(1))
model.compile(optimzer=RMSprop(), loss='mae')
history = model.fit(train_gen_1,
steps_per_epoch=per_epoch,
epochs=20,
validation_data=val_gen_1,
validation_steps=val_steps)
# model summary
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
gru (GRU) (None, 32) 6336
_________________________________________________________________
dense (Dense) (None, 1) 33
=================================================================
Total params: 6,369
Trainable params: 6,369
Non-trainable params: 0
_________________________________________________________________
I found the equation in this answer but is does not produce the right results. I would be interested also in the information source as I would need to cite it in an academic report.
the input data shape is (85880, 32)