(self, inputs, targets)
| 26 | self.focal_loss = FocalLoss(to_onehot_y=True, gamma=2.0) |
| 27 | |
| 28 | def forward(self, inputs, targets): |
| 29 | dice = self.dice_loss(inputs, targets) |
| 30 | focal = self.focal_loss(inputs, targets) |
| 31 | return self.dice_weight * dice + self.focal_weight * focal |
| 32 | |
| 33 | |
| 34 | GPUdevice = torch.device('cuda', args.gpu_device) |
nothing calls this directly
no outgoing calls
no test coverage detected