Spec-Zone.ru › TensorFlow 1.15

tf.keras.preprocessing.image.img_to_array

View source on GitHub

Преобразует экземпляр PIL Image в массив NumPy.

Просмотр псевдонимов

Псевдонимы для миграции

См. Руководство по миграции для получения дополнительной информации.

tf.compat.v1.keras.preprocessing.image.img_to_array, `tf.compat.v2.keras.preprocessing.image.img_to_array`

tf.keras.preprocessing.image.img_to_array(
    img, data_format=None, dtype=None
)
Аргументы
img Экземпляр PIL Image.
data_format Формат данных изображения, либо "channels_first", либо "channels_last".
dtype Тип данных для возвращаемого массива.
Возвращает
3D массив NumPy.
Возможные исключения
ValueError если передан недопустимый img или data_format.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/preprocessing/image/img_to_array

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API