Thanks for your share. When I run this version (40ae1aa) code and I get the following error:
`/userfolder/relaynet_pytorch/relaynet_pytorch/net_api/losses.py in forward(self, output, target, weights, ignore_index)
60 encoded_target[mask] = 0
61 else:
---> 62 encoded_target.scatter_(1, target.unsqueeze(1), 1)
63
64 if weights is None:
RuntimeError: invalid argument 3: Index tensor must have same dimensions as output tensor at /pytorch/aten/src/THC/generic/THCTensorScatterGather.cu:289
`
And the input data's size is [NumData, 1, rows, cols], the corresponding label's size is [NumData, 1,rows, cols]. The target of our is to segment 10 class.
I read the code and don't understand these code:
`
relaynet_pytorch/relaynet_pytorch/net_api/losses.py
lin51:output = output.exp()
lin52:encoded_target = output.detach() * 0
line61:encoded_target.scatter_(1, target.unsqueeze(1), 1)
`
In the older versions, the implementation of DiceLoss is different from this version code. And the older vision as follows:
`
class DiceLoss(_Loss):
def forward(self, input, target):
return 1 - dice_coeff(input, target)
`
So which is better ? or which is the right version for the "ReLayNet" paper ?
Thanks a lot!