Skip to content

Commit 378a327

Browse files
authored
fix error message if v2 transform is not JIT scriptable (#7196)
1 parent 1120aa9 commit 378a327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/prototype/transforms/_transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __prepare_scriptable__(self) -> nn.Module:
130130
# is around.
131131
if self._v1_transform_cls is None:
132132
raise RuntimeError(
133-
f"Transform {type(self.__name__)} cannot be JIT scripted. "
133+
f"Transform {type(self).__name__} cannot be JIT scripted. "
134134
f"This is only support for backward compatibility with transforms which already in v1."
135135
f"For torchscript support (on tensors only), you can use the functional API instead."
136136
)

0 commit comments

Comments
 (0)