MontaEllis / Pytorch-Medical-Segmentation

This repository is an unoffical PyTorch implementation of Medical segmentation in 2D and 3D.
MIT License
860 stars 196 forks source link

predict & target shape do not match #54

Open ll-gh opened 1 year ago

ll-gh commented 1 year ago

How to solve this problem? input size:torch.Size([2, 2, 32, 32, 32]) target size: torch.Size([2, 64, 32, 32])

BelieferQAQ commented 1 year ago

how to solve this problem?

QianLingjun commented 1 year ago

我是改成这样子,就可以了。loss = criterion_ce(outputs, target_argmax) + criterion_dice(outputs_argmax, target_argmax)