Tensorflow 在keras的模型中洗牌
在Tensorflow 在keras的模型中洗牌,tensorflow,deep-learning,keras,Tensorflow,Deep Learning,Keras,在keras的model.fit中,有一个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
keras
的model.fit
中,有一个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
元素的列表,那么整个列表将在每个历元之前随机排列?当然,如果批大小为250
,则仅对属于每个批的元素进行排列?正确的理解应该是什么?它会,然后根据传递给fit
的batch\u size
参数
编辑
正如@yuk在评论中指出的那样,该准则自2018年以来发生了重大变化。shuffle
参数的文档现在看起来更清晰了。您可以选择洗牌整个训练数据,或只洗牌批次:
shuffle: Boolean (whether to shuffle the training data
before each epoch) or str (for 'batch'). This argument is ignored
when `x` is a generator. '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`.
这些链接不再存在:(