summaryrefslogtreecommitdiff
path: root/models/rgb_part_net.py
diff options
context:
space:
mode:
authorJordan Gong <jordan.gong@protonmail.com>2021-02-19 21:03:17 +0800
committerJordan Gong <jordan.gong@protonmail.com>2021-02-19 21:03:17 +0800
commita31eb135c8cc3a8737fabca54fe3d5791f293753 (patch)
treea89fd41704de2e94f7c0dd1e58253189ffe8cd54 /models/rgb_part_net.py
parentd4d2154ff886da65f7c2ca429a24e9c3e9666dee (diff)
Correct cross reconstruction loss calculated in DataParallel
Diffstat (limited to 'models/rgb_part_net.py')
-rw-r--r--models/rgb_part_net.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/rgb_part_net.py b/models/rgb_part_net.py
index bd3a31c..67acac3 100644
--- a/models/rgb_part_net.py
+++ b/models/rgb_part_net.py
@@ -84,7 +84,7 @@ class RGBPartNet(nn.Module):
pn_ba_trip = self.pn_ba_trip(
x[self.hpm_num_parts:], y[self.hpm_num_parts:]
)
- losses = (*losses, hpm_ba_trip, pn_ba_trip)
+ losses = torch.stack((*losses, hpm_ba_trip, pn_ba_trip))
return losses, images
else:
return x.unsqueeze(1).view(-1)