-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I met this error when run with my data. #22
Comments
same question... |
and i fixed it py checking my segmentation data( finding two label3, but i have not label3), hope help you |
Hi, I have the same question. |
看起来是输入图像的维度不匹配,看下原始mri的数据是不是多期 |
网络输入与输出的不匹配是在模型地方就存在了bug,输入256256,但是输出最后一层是512512,希望作者可以看下这里的问题,谢谢 |
上采样那里括号里三个数字都改成和第一个数字一样就行了(8,8,8)这样 |
您好,请问您找到解决方法了吗 |
|
|
能解释一下吗 我加了这行代码我的tumor_dice一直是0 |
同 |
HI, @lee-zq
I met this error when run with my data.
My data is brain MRI OASIS data (nii file format).
What's wrong to me?
...
)
(map1): Sequential(
(0): Conv3d(256, 2, kernel_size=(1, 1, 1), stride=(1, 1, 1))
(1): Upsample(scale_factor=(8.0, 8.0, 8.0), mode=trilinear)
(2): Softmax(dim=1)
)
)
Total number of parameters: 9498744
=======Epoch:1=======lr:0.0001
0%| | 0/3 [00:00<?, ?it/s]torch.Size([2, 1, 48, 128, 128]) torch.Size([2, 48, 128, 128])
0%| | 0/3 [00:01<?, ?it/s]
Traceback (most recent call last):
File "/Users/tessor2/3DUNet-Pytorch/train.py", line 94, in
train_log = train(model, train_loader, optimizer, loss, args.n_labels, alpha)
File "/Users/tessor2/3DUNet-Pytorch/train.py", line 46, in train
target = common.to_one_hot_3d(target,n_labels)
File "/Users/tessor2/3DUNet-Pytorch/utils/common.py", line 9, in to_one_hot_3d
one_hot = torch.zeros(n, n_classes, s, h, w).scatter_(1, tensor.view(n, 1, s, h, w), 1)
RuntimeError: index 243 is out of bounds for dimension 1 with size 2
E
Thanks in advance ~
Best,
@bemoregt.
The text was updated successfully, but these errors were encountered: