# How to handle a timestep length of 0 in a LSTM model?

So I have a variable input size LSTM model similar to the one from this answer but with one-hot encoded variables.

The x_train in my generator is shaped like this: (batch_size, timestep_length, dummy_feature_count) and I have no issues as long as my time-step is not equal to zero in which case I get this error:

  (0) Unimplemented: TensorArray has size zero, but element shape [?,50] is not fully defined. Currently only static shapes are supported when packing zero-size TensorArrays.
[[{{node lstm_1/TensorArrayStack/TensorArrayGatherV3}}]]
[[Mean/_67]]
(1) Unimplemented: TensorArray has size zero, but element shape [?,50] is not fully defined. Currently only static shapes are supported when packing zero-size TensorArrays.
[[{{node lstm_1/TensorArrayStack/TensorArrayGatherV3}}]]


How should I handle this?