stack expects each tensor to be equal size, but got [3, x, x] at entry 0 and [3, 224, 224] at

 通过DataLoader获取图片时,出现错误,明明自己在transforms中加入了Resize方法

最后得知, 

 

因此改为

 得以解决 

你可能感兴趣的:(python,pytorch)