We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
iter_
In the module soft_cldice at /cldice_loss/pytorch , there is a parameter iter_ that used to initialize self.iter, but then nerver used.
soft_cldice
/cldice_loss/pytorch
self.iter
class soft_cldice(nn.Module): def __init__(self, iter_=3, smooth = 1., exclude_background=False): super(soft_cldice, @self).__init__() self.iter = iter_ self.smooth = smooth self.soft_skeletonize = SoftSkeletonize(num_iter=10) self.exclude_background = exclude_background def forward(self, y_true, y_pred): if self.exclude_background: y_true = y_true[:, 1:, :, :] y_pred = y_pred[:, 1:, :, :] skel_pred = self.soft_skeletonize(y_pred) skel_true = self.soft_skeletonize(y_true) tprec = (torch.sum(torch.multiply(skel_pred, y_true))+self.smooth)/(torch.sum(skel_pred)+self.smooth) tsens = (torch.sum(torch.multiply(skel_true, y_pred))+self.smooth)/(torch.sum(skel_true)+self.smooth) cl_dice = 1.- 2.0*(tprec*tsens)/(tprec+tsens) return cl_dice
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the module
soft_cldice
at/cldice_loss/pytorch
, there is a parameteriter_
that used to initializeself.iter
, but then nerver used.The text was updated successfully, but these errors were encountered: