Beispiel #1
0
    def create_loss(self, coarse, fine, gt):
        _, _, loss_coarse = eval(self.args.dist_fun)(coarse, gt)
        dist1, dist2, loss_fine = eval(self.args.dist_fun)(fine, gt)
        loss = loss_coarse + loss_fine
        emd_cost = emd(fine, gt)

        return dist1, dist2, loss, emd_cost
Beispiel #2
0
 def create_loss(self, outputs, gt):
     emd_cost = emd(outputs, gt)
     dist1, dist2, loss = eval(self.args.dist_fun)(outputs, gt)
     return dist1, dist2, loss, emd_cost
Beispiel #3
0
    def create_loss(self, outputs, gt):
        dist1, dist2, loss = eval(self.args.dist_fun)(outputs, gt)
        emd_cost = emd(outputs[:, 0:gt.shape[1], :], gt)

        return dist1, dist2, loss, emd_cost