Keras使用的数据类型是numpy,有时候需要手动打乱数据集。
from numpy as np
length = data.shape[0]
index=np.arange(length)
np.random.shuffle(index)
data = data[index]
label = label[index]
Keras使用的数据类型是numpy,有时候需要手动打乱数据集。
from numpy as np
length = data.shape[0]
index=np.arange(length)
np.random.shuffle(index)
data = data[index]
label = label[index]
本文标题:对数据集进行shuffle操作
本文链接:https://www.haomeiwen.com/subject/ufbcgltx.html
网友评论