mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-23 15:50:39 +08:00
Old-style string formatting fails when passed a tuple.
Summary: When the error occurs, another exception is thrown when tensor shape is passed to the % formatting. I have found all entries for `msg %` and fixed potential failures Reviewed By: nikhilaravi Differential Revision: D20386511 fbshipit-source-id: c05413eb4867cab1ddc9615dffbd0ebd3adfcaf9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb97ab104e
commit
cae325718e
@@ -103,7 +103,7 @@ class Textures(object):
|
||||
raise ValueError(msg % repr(faces_uvs.shape))
|
||||
if verts_rgb is not None and verts_rgb.ndim != 3:
|
||||
msg = "Expected verts_rgb to be of shape (N, V, 3); got %r"
|
||||
raise ValueError(msg % verts_rgb.shape)
|
||||
raise ValueError(msg % repr(verts_rgb.shape))
|
||||
if maps is not None:
|
||||
if torch.is_tensor(maps) and maps.ndim != 4:
|
||||
msg = "Expected maps to be of shape (N, H, W, 3); got %r"
|
||||
|
||||
Reference in New Issue
Block a user