Skip to content
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

RuntimeError: number of dims don't match in permute #366

Open
40618233 opened this issue May 23, 2022 · 1 comment
Open

RuntimeError: number of dims don't match in permute #366

40618233 opened this issue May 23, 2022 · 1 comment

Comments

@40618233
Copy link

Hi,I have this problem, can you help me?

Traceback (most recent call last):
File "c:/Users/Hong/PycharmProjects/Pytorch-UNet-master/train.py", line 207, in
train_net(net=net,
File "c:/Users/Hong/PycharmProjects/Pytorch-UNet-master/train.py", line 132, in train_net
val_score = evaluate(net, val_loader, device)
File "c:\Users\Hong\PycharmProjects\Pytorch-UNet-master\evaluate.py", line 19, in evaluate
mask_true = F.one_hot(mask_true, net.n_classes).permute(256,256,256,256).float()
RuntimeError: number of dims don't match in permute

@Mountainsmaydepart
Copy link

Mountainsmaydepart commented May 24, 2022

i think
permute(256,256,256,256)
is wrong
you can try to understand how permute is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants