https://github.com/tensorflow/tfjs-examples/blob/master/webcam-transfer-learning/index.js says
// Train the model! Model.fit() will shuffle xs & ys so we don't have to.
model.fit(controllerDataset.xs, controllerDataset.ys, {
batchSize,
epochs: ui.getEpochs(),
callbacks: {
onBatchEnd: async (batch, logs) => {
ui.trainStatus('Loss: ' + logs.loss.toFixed(5));
}
}
});
}
While the documentation for fit says only the following regarding shuffling:
shuffle (boolean) Whether to shuffle the training data before each epoch. Has no effect when stepsPerEpoch is not null.
Unless "shuffle" is true by default (which should be well-documented if somehow true) then comment on example code is incorrect.