2021
07-31
07-31
Pytorch DataLoader shuffle验证方式
shuffle=False时,不打乱数据顺序shuffle=True,随机打乱importnumpyasnpimporth5pyimporttorchfromtorch.utils.dataimportDataLoader,Dataseth5f=h5py.File('train.h5','w');data1=np.array([[1,2,3],[2,5,6],[3,5,6],[4,5,6]])data2=np.array([[1,1,1],[1,2,6],[1,3,6],[1,4,6]])h5f.create_dataset(...
继续阅读 >