image_path = tf.keras.utils.get_file('img.jpeg', 'link') #'link' in my code is replaces with a alink to a google drive image image_raw = tf.io.read_file(image_path) image = tf.image.decode_image(image_raw)該代碼是我在網上找到的用于生成對抗性示例的代碼的一部分。在原始代碼中,他們傳遞了一個在線圖像的鏈接tf.keras.utils.get_file,并且運行它不會出現錯誤。但是,當我將其替換為指向我的谷歌驅動器上的圖像的鏈接時,我收到此錯誤InvalidArgumentError: Expected"tf.Tensor(False, shape=(), dtype=bool)' to be true. Summarized data: b'Unable to decode bytes as JPEG, PNG, GIF, or BMP'" referring to tf.image.decode_image
添加回答
舉報
0/150
提交
取消