Skip to content

Commit 801fb20

Browse files
zzh8829meetps
authored andcommitted
Update loss.py
fix incorrect loss function
1 parent bc523a7 commit 801fb20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ptsemseg/loss/loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def multi_scale_cross_entropy2d(input, target, weight=None, size_average=True, s
2727
n_inp = len(input)
2828
scale = 0.4
2929
scale_weight = torch.pow(scale * torch.ones(n_inp), torch.arange(n_inp).float()).to(
30-
input.device
30+
target.device
3131
)
3232

3333
loss = 0.0

0 commit comments

Comments
 (0)