3
$\begingroup$

I want to train a neural network using keras.

model.fit(trainX, trainY, batch_size=400, epochs=1000,shuffle=False)

I want the model training using the sequence of original data set order, not shuffle.

$\endgroup$
3
  • $\begingroup$ That's what 'shuffle=False' is for - could you give us some more detail about what you've tried and what's not working? $\endgroup$
    – redhqs
    Apr 25 '19 at 9:09
  • $\begingroup$ Thank you for your reply. when set shuffle=False, the train will using the original data set order? I thought it will disrupt the orginal dataset, but what disrupt will same in every epoch. When set shuffle=true, the disrupt will different in every epoch. $\endgroup$
    – hellozq
    Apr 25 '19 at 10:15
  • $\begingroup$ I find 'shuffle=False' is for it, not like what I thought. $\endgroup$
    – hellozq
    Apr 26 '19 at 3:21
3
$\begingroup$

By default, Keras will shuffle training data before each epoch (shuffle=True).

If you would like to retain the ordering of your dataset, then set shuffle=False (docs here).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.