Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed May 31, 2024
1 parent c5810ff commit ff40253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchvision/io/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def write_jpeg(input: torch.Tensor, filename: str, quality: int = 75):
if not torch.jit.is_scripting() and not torch.jit.is_tracing():
_log_api_usage_once(write_jpeg)
output = encode_jpeg(input, quality)
assert isinstance(output, torch.Tensor)
assert isinstance(output, torch.Tensor) # Needed for torchscript
write_file(filename, output)


Expand Down

0 comments on commit ff40253

Please sign in to comment.