Fix normal orientation loss (#1298)

Co-authored-by: Abhik Ahuja <ahujaabhik@berkeley.edu>
This commit is contained in:
Matthew TancikandAbhik Ahuja authored and GitHub committed 2023-01-27 13:56:19 -08:00
1 parent 7979310def
commit 8c41a263b8
1 file changed
+1 -1
+1 -1
View File
@@ -193,7 +193,7 @@ def orientation_loss(
"""
w = weights
n = normals
v = viewdirs
v = viewdirs * -1
n_dot_v = (n * v[..., None, :]).sum(axis=-1)
return (w[..., 0] * torch.fmin(torch.zeros_like(n_dot_v), n_dot_v) ** 2).sum(dim=-1)