fix pts scale, save ply

Summary:
Fix:
* Scaling of point clouds for scalars
* save_ply compatible cat

Reviewed By: nikhilaravi

Differential Revision: D22298609

fbshipit-source-id: abe94a5b64baf325587202d20adfc36912cc1478
This commit is contained in:
Georgia Gkioxari
2020-07-03 10:19:58 -07:00
committed by Facebook GitHub Bot
parent 275ddade66
commit 2f0fd60186
4 changed files with 41 additions and 27 deletions

View File

@@ -783,7 +783,11 @@ def save_ply(
decimal_places: Number of decimal places for saving.
"""
verts_normals = torch.FloatTensor([]) if verts_normals is None else verts_normals
verts_normals = (
torch.tensor([], dtype=torch.float32, device=verts.device)
if verts_normals is None
else verts_normals
)
faces = torch.LongTensor([]) if faces is None else faces
if len(verts) and not (verts.dim() == 2 and verts.size(1) == 3):