Skip to content
Snippets Groups Projects
Commit b8cb5369 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[libs.segmentation.models.losses] Use explicit version of super() to solve issues with Python-3.11

parent f193c9b1
No related branches found
No related tags found
1 merge request!46Create common library
Pipeline #89372 passed
......@@ -121,7 +121,10 @@ class MultiWeightedBCELogitsLoss(WeightedBCELogitsLoss):
"""
return torch.cat(
[super().forward(i, target).unsqueeze(0) for i in input_]
[
super(MultiWeightedBCELogitsLoss, self).forward(i, target).unsqueeze(0)
for i in input_
]
).mean()
......@@ -155,5 +158,10 @@ class MultiSoftJaccardBCELogitsLoss(SoftJaccardBCELogitsLoss):
"""
return torch.cat(
[super().forward(i, target).unsqueeze(0) for i in input_]
[
super(MultiSoftJaccardBCELogitsLoss, self)
.forward(i, target)
.unsqueeze(0)
for i in input_
]
).mean()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment