Skip to content

Commit 943520f

Browse files
committed
Use reaad_file
1 parent bbe59a9 commit 943520f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/smoke_test/smoke_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def smoke_test_torchvision() -> None:
4141
print('Is torchvision useable?', all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]))
4242

4343
def smoke_test_torchvision_read_decode() -> None:
44-
from torchvision.io import read_image, decode_jpeg, decode_png
45-
img_jpg = read_image(str(pathlib.Path(__file__).parent / 'assets' / 'rgb_pytorch.jpg'))
44+
from torchvision.io import read_file, decode_jpeg, decode_png
45+
img_jpg = read_file(str(pathlib.Path(__file__).parent / 'assets' / 'rgb_pytorch.jpg'))
4646
img_jpg_nv = decode_jpeg(img_jpg)
4747
img_png = read_image(str(pathlib.Path(__file__).parent / 'assets' / 'rgb_pytorch.png'))
4848
assert img_png.ndim == 3 and img_png.numel() > 100

0 commit comments

Comments
 (0)