Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9e87618f
Unverified
Commit
9e87618f
authored
Oct 27, 2023
by
Daniil
Committed by
GitHub
Oct 27, 2023
Browse files
Fix docstring and type hint for resize (#27104)
fix docstring and type hint for resize
parent
ef23b68e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/image_transforms.py
src/transformers/image_transforms.py
+2
-2
No files found.
src/transformers/image_transforms.py
View file @
9e87618f
...
@@ -274,7 +274,7 @@ def get_resize_output_image_size(
...
@@ -274,7 +274,7 @@ def get_resize_output_image_size(
def
resize
(
def
resize
(
image
,
image
:
np
.
ndarray
,
size
:
Tuple
[
int
,
int
],
size
:
Tuple
[
int
,
int
],
resample
:
"PILImageResampling"
=
None
,
resample
:
"PILImageResampling"
=
None
,
reducing_gap
:
Optional
[
int
]
=
None
,
reducing_gap
:
Optional
[
int
]
=
None
,
...
@@ -286,7 +286,7 @@ def resize(
...
@@ -286,7 +286,7 @@ def resize(
Resizes `image` to `(height, width)` specified by `size` using the PIL library.
Resizes `image` to `(height, width)` specified by `size` using the PIL library.
Args:
Args:
image (`
PIL.Image.Image` or `np.ndarray` or `torch.Tensor
`):
image (`
np.ndarray
`):
The image to resize.
The image to resize.
size (`Tuple[int, int]`):
size (`Tuple[int, int]`):
The size to use for resizing the image.
The size to use for resizing the image.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment