Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tensorflow 在keras的模型中洗牌_Tensorflow_Deep Learning_Keras - Fatal编程技术网

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`.

这些链接不再存在:(