Fix get_background_color

This commit is contained in:
Jonas Kulhanek committed 2023-07-17 14:11:06 +02:00
1 parent 520e6a05c7
commit 220ef3a459
1 file changed
+2 -2
+2 -2
View File
@@ -111,9 +111,9 @@ class RGBRenderer(nn.Module):
# Note, this is only supported for non-packed samples.
background_color = rgb[..., -1, :]
else:
background_color = cls.get_background_color(background_color, shape=rgb.shape, device=rgb.device)
background_color = cls.get_background_color(background_color, shape=comp_rgb.shape, device=comp_rgb.device)
assert isinstance(background_color, torch.Tensor)
comp_rgb = comp_rgb + background_color.to(weights.device) * (1.0 - accumulated_weight)
comp_rgb = comp_rgb + background_color * (1.0 - accumulated_weight)
return comp_rgb
@classmethod