Is it just a different way of setting the same thing or do they actually have different meanings? Does it have anything to do with network configuration?
On a simple example, I couldn't observe any difference between:
model = Sequential()
model.add(LSTM(1, batch_input_shape=(None,5,1), return_sequences=True))
model.add(LSTM(1, return_sequences=False))
and
model = Sequential()
model.add(LSTM(1, input_shape=(5,1), return_sequences=True))
model.add(LSTM(1, return_sequences=False))
However when I set the batch size to 12 batch_input_shape=(12,5,1)
and used batch_size=10
when fitting the model, I got an error.
ValueError: Cannot feed value of shape (10, 5, 1) for Tensor 'lstm_96_input:0', which has shape '(12, 5, 1)'
Which obviously makes sense. However I can see no point in restricting the batch size on model level.
Am I missing something?