01. TensorFlow installation not found - running with reduced feature set.

(smy) D:\00_learn>tensorboard --logdir=logs
TensorFlow installation not found - running with reduced feature set.
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.17.0 at http://localhost:6006/ (Press CTRL+C to quit)

TensorFlow 没有安装

conda install tensorflow

02. No dashboards are active for the current data set.

在这里插入图片描述

意思就是无法从事件文件中加载出任何数据。

首先确定路径不含中文

方法一:更改端口号

tensorboard --logdir=logs --port=6070

方法二:改为绝对路径,以下三种命令都是可行的

tensorboard --logdir=D:\00_learn\learn\logs
tensorboard --logdir="D:\00_learn\learn\logs"
tensorboard --logdir "D:\00_learn\learn\logs"

方法三:更改端口号+绝对路径

tensorboard --logdir "D:\00_learn\learn\logs" --port=6070

方法四:使用其他浏览器打开网页(谷歌)

如果是以下这种错误,可能是代码里含有空格(也可以按以上方法尝试解决)

tensorboard: error: argument {serve}: invalid choice: ‘D:\00_learn\logs_maxpool’ (choose from ‘serve’)

03. 使用 Image 打开图片出错

RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0

img_PIL = Image.open("images/dog.jpg")

改为

img_PIL = Image.open("images/dog.jpg").convert('RGB')
Logo

永洪科技,致力于打造全球领先的数据技术厂商,具备从数据应用方案咨询、BI、AIGC智能分析、数字孪生、数据资产、数据治理、数据实施的端到端大数据价值服务能力。

更多推荐