2021
03-07
03-07
pytorch 数据加载性能对比分析
传统方式需要10s,dat方式需要0.6simportosimporttimeimporttorchimportrandomfromcommon.coco_datasetimportCOCODatasetdefgen_data(batch_size,data_path,target_path):os.makedirs(target_path,exist_ok=True)dataloader=torch.utils.data.DataLoader(COCODataset(data_path,(352,352),is_training=False,is_scene=True),batch_size=batch_size,shuffle=F...
继续阅读 >