在keras的model.fit中洗牌

时间:2018-05-04 23:08:19

标签: tensorflow deep-learning keras

model.fit的{​​{1}}中,有一个keras参数,

shuffle

假设训练集是一个包含shuffle: Boolean (whether to shuffle the training data before each epoch) or str (for 'batch'). 'batch' is a special option for dealing with the limitations of HDF5 data; it shuffles in batch-sized chunks. Has no effect when steps_per_epoch is not None. 元素的列表,那么整个列表将在每个纪元之前被随机置换?如果批量大小为50000,那么只有属于每个批次的元素才会被置换?什么应该是正确的理解?

1 个答案:

答案 0 :(得分:5)

根据您传递给batch_size的{​​{1}}参数,它将shuffle your entire dataset (x, y and sample_weight together) first然后make batches