-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Open
Labels
Description
Doc Issue
The doc of keras.preprocessing.image.smart_resize()
shows its description as below:
keras/keras/src/utils/image_utils.py
Lines 357 to 358 in 3fac66f
backend_module: Backend module to use (if different from the default | |
backend). |
For the repro below, I know that the default backend is keras.src.backend
, but what backend can be served as other Backend module to use
?
I tried keras.backend
but failed. If there are some other backends available to use, I suggest to note some examples of them in the docstring above.
Thanks a lot!
Repro
import numpy as np
import keras
size = (256, 256)
backend_module = keras.backend
image = np.random.randint(0, 256, size=(size[0], size[1], 3), dtype=np.uint8)
resized_image = keras.preprocessing.image.smart_resize(image, size, interpolation='bicubic', backend_module=backend_module)
print('Original Image Shape:', image.shape)
print('Resized Image Shape:', resized_image.shape)
Output
AttributeError: module 'keras.api.backend' has no attribute 'convert_to_tensor'