lee-zq/3DUNet-Pytorch

维度不匹配问题

Opened this issue · 5 comments

有哪位大佬知道这个问题怎么解决
dice += (pred[:,i] * target[:,il)sum(din=l)sum(din=l)sun(din=l) / ((pred[:,i] * target[:,i)sum(din=l)sum(din=l).sumn(din=l)+
RuntimeError: The size of tensor a (1024) must match the size of tensor b (512) at non-sinaleton dimension 3

网络的每层map参数有问题

RuntimeError: The size of tensor a (512) must match the size of tensor b (256) at non-singleton dimension 3我也是维度不对,请问怎么解决啊

有哪位大佬知道这个问题怎么解决 dice += (pred[:,i] * target[:,il)sum(din=l)sum(din=l)sun(din=l) / ((pred[:,i] * target[:,i)sum(din=l)sum(din=l).sumn(din=l)+ RuntimeError: The size of tensor a (1024) must match the size of tensor b (512) at non-sinaleton dimension 3

请问解决了吗

@goodgoodstudy233 我的建议是不要玩这个,对于现在来说太垃圾了,最好是去用MONAI或者nnUNet。如果你非要玩我建议,自己在网络里面每一层把尺寸打印出来,一点点debug。最后我还是强烈建议放弃这个项目,当作熟悉pipeline就行,不如花时间去看别的优秀模型。

@goodgoodstudy233 我的建议是不要玩这个,对于现在来说太垃圾了,最好是去用MONAI或者nnUNet。如果你非要玩我建议,自己在网络里面每一层把尺寸打印出来,一点点debug。最后我还是强烈建议放弃这个项目,当作熟悉pipeline就行,不如花时间去看别的优秀模型。

好的,谢谢建议,我之前也跑过Nnunet,效果是很好,就是感觉网络结构很难改。感觉3Dunet好改一些,就是想跑一下看看效果。