data_iter函数的作用是生成一个按批次大小划分的数据迭代器。它首先打乱样本的下标顺序,然后按照指定的...
for X, y in data_iter(batch_size, features, labels): print(X, '\n', y) # break
fs_path)ifold_fisnotNone:size=0withold_f:withdoc.data_file.open('wb')asnew_f:forblockinRepUtils.iter_file_data(old_f):new_f.write(block)size+=len(block