神将网络训练的时候将数据随机打乱:
import random
data = [1,2,3]
label = [4,5,6]
data[:], label[:] = zip(*list(zip(data.label)))
zip()和zip(*)的命令类似于压缩和解压
神将网络训练的时候将数据随机打乱:
import random
data = [1,2,3]
label = [4,5,6]
data[:], label[:] = zip(*list(zip(data.label)))
zip()和zip(*)的命令类似于压缩和解压