项目场景: 进行tf 加载数据时,出现“images” contains no shape 错误 问题描述 例如:tf.io.read_file 时,get_shape为空 img = tf.io.read_file(path_to_img) 解决方案: 在代码开头添加 tf.enable_eager_execution() restart,重新运行代码块即可。