Skip to content

Commit 0a946d5

Browse files
ambujpawarAmbuj Pawar
andauthored
DOC: add limitation of decode_jpeg in the function docstring (#6637)
* add limitation of decode_jpeg in the function docstring * undo unwanted changes in decode_png Co-authored-by: Ambuj Pawar <[email protected]>
1 parent 4c66712 commit 0a946d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchvision/io/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ def decode_jpeg(
137137
the raw bytes of the JPEG image. This tensor must be on CPU,
138138
regardless of the ``device`` parameter.
139139
mode (ImageReadMode): the read mode used for optionally
140-
converting the image. Default: ``ImageReadMode.UNCHANGED``.
140+
converting the image. The supported modes are: ``ImageReadMode.UNCHANGED``,
141+
``ImageReadMode.GRAY`` and ``ImageReadMode.RGB``
142+
Default: ``ImageReadMode.UNCHANGED``.
141143
See ``ImageReadMode`` class for more information on various
142144
available modes.
143145
device (str or torch.device): The device on which the decoded image will

0 commit comments

Comments
 (0)