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:
parent
d21998f3eb
commit
e1c701e280
@ -240,7 +240,7 @@
|
||||
"# Function to load an image from a file, and add a batch dimension.\n",
|
||||
"def load_img(path_to_img):\n",
|
||||
" img = tf.io.read_file(path_to_img)\n",
|
||||
" img = tf.image.decode_image(img, channels=3)\n",
|
||||
" img = tf.io.decode_image(img, channels=3)\n",
|
||||
" img = tf.image.convert_image_dtype(img, tf.float32)\n",
|
||||
" img = img[tf.newaxis, :]\n",
|
||||
"\n",
|
||||
|
Loading…
Reference in New Issue
Block a user