Pytorch数组中的轴不匹配错误

2024-09-30 10:34:27 发布

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

尝试在PyVnet中运行Torch (https://github.com/mattmacy/vnet.pytorch)并用

x_max = 512 
y_max = 512 
z_max = 500 
voxspacing = 0.7 

当我在for循环通过数据加载器枚举的行上调用tran函数时,我得到一个

axes don't match array error.

我不知道怎么解决这个问题。任何帮助都会很有帮助的。我是机器学习的新手


Tags: 数据函数httpsgithubcomfortorchpytorch
1条回答
网友
1楼 · 发布于 2024-09-30 10:34:27

注释第417行和第418行。这个问题会解决的

问题是因为这两条线

if self.transform is not None:
     img = self.transform(img)

相关问题 更多 >

    热门问题