You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nshulga/miniconda3/envs/py-311/lib/python3.11/site-packages/torchvision/io/image.py", line 269, in decode_image
output = torch.ops.image.decode_image(input, mode.value, apply_exif_orientation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nshulga/miniconda3/envs/py-311/lib/python3.11/site-packages/torch/_ops.py", line 1061, in __call__
return self_._op(*args, **(kwargs or {}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: image::decode_image() Expected a value of type 'Tensor' for argument 'data' but instead found type 'str'.
Position: 0
Value: 'foo.png'
Declaration: image::decode_image(Tensor data, int mode, bool apply_exif_orientation=False) -> Tensor
Cast error details: Unable to cast foo.png to Tensor
🐛 Describe the bug
By looking at https://pytorch.org/vision/0.20/generated/torchvision.io.decode_image.html
it feels like one should be able to do something like
but it fails with
But read_image works as expeted:
Versions
0.19.1
The text was updated successfully, but these errors were encountered: