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:
Roman Shapovalov
2020-03-11 11:15:33 -07:00
committed by Facebook GitHub Bot
parent fb97ab104e
commit cae325718e
4 changed files with 6 additions and 6 deletions

View File

@@ -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"