mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
ambient lights batching #1043
Summary: convert_to_tensors_and_broadcast had a special case for a single input, which is not used anywhere except fails to do the right thing if a TensorProperties has only one kwarg. At the moment AmbientLights may be the only way to hit the problem. Fix by removing the special case. Fixes https://github.com/facebookresearch/pytorch3d/issues/1043 Reviewed By: nikhilaravi Differential Revision: D33638345 fbshipit-source-id: 7a6695f44242e650504320f73b6da74254d49ac7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fddd6a700f
commit
9e2bc3a17f
@@ -349,7 +349,4 @@ def convert_to_tensors_and_broadcast(
|
||||
expand_sizes = (N,) + (-1,) * len(c.shape[1:])
|
||||
args_Nd.append(c.expand(*expand_sizes))
|
||||
|
||||
if len(args) == 1:
|
||||
args_Nd = args_Nd[0] # Return the first element
|
||||
|
||||
return args_Nd
|
||||
|
||||
Reference in New Issue
Block a user