(self, preds, gt)
| 142 | } |
| 143 | |
| 144 | def forward(self, preds, gt): |
| 145 | loss = 0. |
| 146 | for _, pred_lvl in enumerate(preds): |
| 147 | if pred_lvl is None: |
| 148 | continue |
| 149 | for criterion_name, criterion in self.criterions_last.items(): |
| 150 | loss += criterion(pred_lvl, gt) * self.lambdas_cls[criterion_name] |
| 151 | return loss |
| 152 | |
| 153 | |
| 154 | class PixLoss(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected