diff --git a/torchvision/prototype/transforms/_transform.py b/torchvision/prototype/transforms/_transform.py index 675b0787e83..c49306cc523 100644 --- a/torchvision/prototype/transforms/_transform.py +++ b/torchvision/prototype/transforms/_transform.py @@ -130,7 +130,7 @@ def __prepare_scriptable__(self) -> nn.Module: # is around. if self._v1_transform_cls is None: raise RuntimeError( - f"Transform {type(self.__name__)} cannot be JIT scripted. " + f"Transform {type(self).__name__} cannot be JIT scripted. " f"This is only support for backward compatibility with transforms which already in v1." f"For torchscript support (on tensors only), you can use the functional API instead." )