【发布时间】:2020-10-04 06:57:41
【问题描述】:
我正在从这里的教程中运行这段代码:https://keras.io/examples/vision/image_classification_from_scratch/
使用自定义数据集,如教程中那样分为 2 个数据集。但是,我收到了这个错误:
TypeError: Input 'filename' of 'ReadFile' Op has type float32 that does not match expected type of string.
我做了这个选角。我试过这个:
is_jfif = str(tf.compat.as_bytes("JFIF")) in fobj.peek(10)
但就错误而言没有任何改变 我整天都在想办法解决它,但没有任何成功。有人能帮我吗?谢谢...
【问题讨论】:
-
请提供完整的错误输出,以及minimal reproducible example。
-
查看(并发布)整个回溯。换句话说,确切的错误。您的代码行与
filename或ReadFile无关。 -
我想我修好了,谢谢你的时间...
-
@just_learning 你如何解决这个问题
-
我在 colab 中运行过