fbcode/vision/fair/pytorch3d/pytorch3d/renderer/utils.py

Reviewed By: bottler

Differential Revision: D93708316

fbshipit-source-id: f8ae2432ad34116278b3f7f7de5146b89c3fe63e
This commit is contained in:
generatedunixname1417043136753450
2026-02-22 04:09:20 -08:00
committed by meta-codesync[bot]
parent cbcae096a0
commit e9ed1cb178

View File

@@ -269,9 +269,7 @@ class TensorProperties(nn.Module):
# to have the same shape as the input tensor.
new_dims = len(tensor_dims) - len(idx_dims)
new_shape = idx_dims + (1,) * new_dims
# pyre-fixme[58]: `+` is not supported for operand types
# `Tuple[int]` and `torch._C.Size`
expand_dims = (-1,) + tensor_dims[1:]
expand_dims = (-1,) + tuple(tensor_dims[1:])
_batch_idx = _batch_idx.view(*new_shape)
_batch_idx = _batch_idx.expand(*expand_dims)