Training LSTM with different sequence lengths in Keras functional api
Model specification is per sample, number of samples should not be included in the dimensions, i.e. (a, b, c) or (sample_size, timesteps, dimension) should be changed to (timesteps, dimension). Also, for variable-length sequences, timesteps should be None. That is, (timesteps, dimension) should be (None, 295). The same goes for (x, y, z).

Please check out this post for feeding variable-length multi-dimensional sequences to Keras LSTM.