mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-25 23:56:00 +08:00
fbcode/vision/fair/pytorch3d/pytorch3d/renderer/utils.py
Reviewed By: bottler Differential Revision: D93708316 fbshipit-source-id: f8ae2432ad34116278b3f7f7de5146b89c3fe63e
This commit is contained in:
committed by
meta-codesync[bot]
parent
cbcae096a0
commit
e9ed1cb178
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user