Improve background_color typing

This commit is contained in:
Nicholas Pfaff committed 2023-07-04 17:09:16 +01:00
1 parent bed684635e
commit 119519d0c3
1 file changed
+4 -2
+4 -2
View File
@@ -107,7 +107,9 @@ class RGBRenderer(nn.Module):
return comp_rgb
@classmethod
def get_background_color(cls, rgb: Float[Tensor, "*bs num_samples 3"], background_color: BackgroundColor) -> Tensor:
def get_background_color(
cls, rgb: Float[Tensor, "*bs num_samples 3"], background_color: BackgroundColor
) -> Float[Tensor, "3"]:
"""Returns the RGB background color for a specified background color.
Args:
@@ -133,7 +135,7 @@ class RGBRenderer(nn.Module):
cls,
rgb: Tensor,
opacity: Tensor,
background_color: Tensor,
background_color: Float[Tensor, "3"],
) -> Float[Tensor, "*bs 3"]:
"""Blends the background color into the image.