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

File "/disk/sdc/shejiao/Pytorch-UNet-master/evaluate.py", line 19, in evaluate mask_true = F.one_hot(mask_true, net.n_classes).permute(0, 3, 1, 2).float() RuntimeError: number of dims don't match in permute #367

Open
DonMuv opened this issue May 29, 2022 · 1 comment

Comments

@DonMuv
Copy link

DonMuv commented May 29, 2022

File "/disk/sdc/shejiao/Pytorch-UNet-master/evaluate.py", line 19, in evaluate
mask_true = F.one_hot(mask_true, net.n_classes).permute(0, 3, 1, 2).float()
RuntimeError: number of dims don't match in permute

@jiangzhen3s
Copy link

mask = np.zeros((W,H,3),dtype=np.uint8)
......
maskImg = Image.fromarray(mask)
maskImg.save(dir+'/train/mask/'+imgPath[0:-4]+'_mask.gif')

it works for me.

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