在notebook中出现 :
TypeError: in user code:
<ipython-input-22-89955dc8daaa>:2 _pre_read *
image = tf.io.read_file(img_filename)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_io_ops.py:572 read_file **
"ReadFile", filename=filename, name=name)
/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:545 _apply_op_helper
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'filename' of 'ReadFile' Op has type float32 that does not match expected type of string.
解决方法:
一般这种错误是在修改了某一个单元格后,只运行了该单元格,你需要在noteboook中从头再运行一遍,才会报出正真的错误。