Hi! Thank you for your great work! 🤗
I have a question when I train the 3D model on the Atrial dataset with the script train_sup_XNet3d.py.
There was an exception:
Then I checked the corresponding tensors in loss_function.py.
For forward(self, output, target) in class DiceLoss(nn.Module) :
The shape of output is torch.Size([1, 2, 96, 96, 80]), however the shape of target_one_hot is torch.Size([1, 96, 96, 80, 256]). There is only 0 and 255 in target, should the target be 1?
In order to facilitate the visualization of segmentation masks, the foreground in the dataset is generally marked as 255. During training, we should convert 255 to 1, that is, foreground = 1, background = 0.
Hi! Thank you for your great work! 🤗 I have a question when I train the 3D model on the Atrial dataset with the script
train_sup_XNet3d.py
. There was an exception: Then I checked the corresponding tensors inloss_function.py
. Forforward(self, output, target)
inclass DiceLoss(nn.Module)
:The shape of
output
is torch.Size([1, 2, 96, 96, 80]), however the shape oftarget_one_hot
is torch.Size([1, 96, 96, 80, 256]). There is only 0 and 255 in target, should the target be 1?