def gen_data(source):
while True:
indices = range(len(source.images)
random.shuffle(indices)
for i in indices:
image = np.reshape(source.images[i], (28, 28, 1))
label = source.labels[i]
深度学习打乱引入数据常用方法np.random.shuffle
最新推荐文章于 2022-12-20 13:41:01 发布