mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-22 23:30:35 +08:00
PyTorch 1.7 compatibility
Summary: Small changes discovered based on circleCI failures. Reviewed By: patricklabatut Differential Revision: D34426807 fbshipit-source-id: 819860f34b2f367dd24057ca7490284204180a13
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f816568735
commit
4d043fc9ac
@@ -7,6 +7,7 @@
|
||||
|
||||
import torch
|
||||
import torch.nn.functional as F
|
||||
from pytorch3d.common.compat import meshgrid_ij
|
||||
from pytorch3d.structures import Meshes
|
||||
|
||||
|
||||
@@ -195,9 +196,7 @@ def cubify(voxels, thresh, device=None, align: str = "topleft") -> Meshes:
|
||||
# NF x 3
|
||||
grid_faces = torch.stack(grid_faces, dim=1)
|
||||
|
||||
y, x, z = torch.meshgrid(
|
||||
torch.arange(H + 1), torch.arange(W + 1), torch.arange(D + 1)
|
||||
)
|
||||
y, x, z = meshgrid_ij(torch.arange(H + 1), torch.arange(W + 1), torch.arange(D + 1))
|
||||
y = y.to(device=device, dtype=torch.float32)
|
||||
x = x.to(device=device, dtype=torch.float32)
|
||||
z = z.to(device=device, dtype=torch.float32)
|
||||
|
||||
Reference in New Issue
Block a user