From aeb1281498ac008a2cb5394451f53d9594c2da6c Mon Sep 17 00:00:00 2001 From: Chakkrit Termritthikun Date: Sun, 16 Feb 2020 23:05:46 +1030 Subject: [PATCH] Fixed error of data type mismatch in loss function Fixed error of data type mismatch in the loss function --- models/deepcrack_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/models/deepcrack_model.py b/models/deepcrack_model.py index 00ed709a..0956cb86 100644 --- a/models/deepcrack_model.py +++ b/models/deepcrack_model.py @@ -98,6 +98,7 @@ def backward(self): lambda_fused = self.opt.lambda_fused self.loss_side = 0.0 + self.label = self.label.float() for out, w in zip(self.outputs[:-1], self.weight_side): #self.loss_side += self.criterionSeg(out, self.label3d) * w self.loss_side += self.criterionSeg(out, self.label) * w