From 801fb200547caa5b0d91b8dde56b837da029f746 Mon Sep 17 00:00:00 2001 From: Zihao Zhang Date: Thu, 28 Feb 2019 15:17:41 -0500 Subject: [PATCH] Update loss.py fix incorrect loss function --- ptsemseg/loss/loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ptsemseg/loss/loss.py b/ptsemseg/loss/loss.py index e567e090..83c5a137 100644 --- a/ptsemseg/loss/loss.py +++ b/ptsemseg/loss/loss.py @@ -27,7 +27,7 @@ def multi_scale_cross_entropy2d(input, target, weight=None, size_average=True, s n_inp = len(input) scale = 0.4 scale_weight = torch.pow(scale * torch.ones(n_inp), torch.arange(n_inp).float()).to( - input.device + target.device ) loss = 0.0