Loading a local image in colab and passing it to decode_image

Hello, I am loading a image through load_img() but the image is loading but it can not be converted to a tensor and passed to decode_image.Tell me,what should i do. I am sharing the link with you.

Note: - I was practicing the tutorial given by you on adverserial attack but i changed the image loading from get_file to load_img

Colab: - Google Colab

Dear Mustafa_tola
You can try this code, hope it helps you.

image = cv2.imread(r"/content/agaye.PNG")
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

Convert the image to Tensor

img_to_tensor = tf.convert_to_tensor(image, dtype=tf.int32)

image = preprocess(image)

image_probs = pretrained_model.predict(image)

Thanks. The problem is solved