Skip to content

Commit

Permalink
Change normalize to make it export friendly
Browse files Browse the repository at this point in the history
As titled.
  • Loading branch information
larryliu0820 authored Jul 2, 2024
1 parent bf01bab commit 7666e93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/transforms/v2/functional/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def normalize(
inplace: bool = False,
) -> torch.Tensor:
"""See :class:`~torchvision.transforms.v2.Normalize` for details."""
if torch.jit.is_scripting():
if torch.jit.is_scripting() or torch._dynamo.is_compiling():
return normalize_image(inpt, mean=mean, std=std, inplace=inplace)

_log_api_usage_once(normalize)
Expand Down

0 comments on commit 7666e93

Please sign in to comment.