2021
07-22
07-22
pytorch中DataLoader()过程中遇到的一些问题
如下所示:RuntimeError:stackexpectseachtensortobeequalsize,butgot[3,60,32]atentry0and[3,54,32]atentry2train_dataset=datasets.ImageFolder(traindir,transforms.Compose([transforms.Resize((224))###原因是transforms.Resize()的参数设置问题,改为如下设置就可以了train_dataset=datasets.ImageFolder(traindir,transforms.Compose([transforms.Resize((22...
继续阅读 >