evermean
evermean

Reputation: 1307

Keras shuffling of multiple inputs

I have a question regarding the shuffling of multiple inputs during the training phase of a model. Given the following call:

model.fit([input_a_0, input_a_1, input_b_0, input_b_1], y_train,
          batch_size=8,
          epochs=4,
          shuffle=True)

All the inputs need to be shuffled in the exact same order so that they align correctly. Now my question is how Keras handles this? Are they all shuffled in the same way (using the same permutation index) or is each input shuffled independently of the other inputs?

Upvotes: 3

Views: 1026

Answers (1)

Daniel Möller
Daniel Möller

Reputation: 86600

Naturally Keras will shuffle them correctly, otherwise there would be a huge number of complaints and open issues about how Keras couldn't reach any good results.

Upvotes: 4

Related Questions