Why does bidirectional LSTM have half the parameter count compared to LSTM in keras?
For Unidirectional LSTM the number of parameters are
4*[(numHiddenUnit+inputSize)*numHuddenUnits+numHuddenUnits]
where 4 is for 4 LSTM gate equations.
For your case numHuddenUnits = 256, inputSize is 28 gives the result 291840
For birectional LSTM the number of parameters are
2 * 4 * [(numHiddenUnit+inputSize)*numHuddenUnits+numHuddenUnits]
where 2 is due to bi-directional weights and 4 is for four gate equations
For your case numHuddenUnits = 128, inputSize = 28 gives the result 160768