MNIST、torchvision中的输出和广播形状不匹配

2024-05-15 11:30:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Torchvision中使用MNIST数据集时遇到以下错误

RuntimeError: output with shape [1, 28, 28] doesn't match the broadcast shape [3, 28, 28]

这是我的代码:

^{pr2}$

Tags: the数据代码outputmatch错误withbroadcast