change tf.image.decode_image to tf.io.decode_image

tf.image.decode_image to tf.io.decode_image for API migration and consistency.
Please see https://www.tensorflow.org/api_docs/python/tf/io/decode_image
This commit is contained in:
angusluo 2020-03-13 12:08:31 +08:00 committed by GitHub
parent e1c701e280
commit 0aa725871e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -605,7 +605,7 @@ class Tensor(_TensorLike):
```python
_, image_data = tf.compat.v1.TFRecordReader(...).read(...)
image = tf.image.decode_png(image_data, channels=3)
image = tf.io.decode_png(image_data, channels=3)
# The height and width dimensions of `image` are data dependent, and
# cannot be computed without executing the op.