tensorflow踩坑合集

tensorflow踩坑合集

  1. E tensorflow/stream_executor/cuda/cuda_dnn.cc:343] ** Loaded runtime CuDNN library: 7.0.5 but source was compiled with: 7.2.1. ** CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
    Segmentation fault (core dumped)
    原因:TensorFlow版本太高,所以需要一个强制弄一个低版本。
pip3 install --upgrade --force-reinstall tensorflow-gpu==1.9.0

2.Pickle: TypeError: a bytes-like object is required, not ‘str’
这是因为Python3和Python2不兼容的原因。
In Python 3 you need to specifically call either ‘rb’ or ‘wb’.
3.mac ssh登录远程服务器时,出现Host key verification failed.

cd ./.ssh
rm known_hosts

4.下载tar.gz文件解压tarfile,显示not a gzip file,说明下载错误,根本就不是gzip文件,可以用file filename.tar.gz查看是不是输出类似(gzippedFile.tar.gz: gzip,如果不是,就说明下载下来的不是gzip文件,重新下载就好。
5.tensorboard查看
当我在Mac上编写,用服务器跑,最后需要查看tensorboard,怎么做呢?
错误
可以发现LANGUAGE和LC_ALL这两项的值为空。
那么执行export LANGUAGE=en_US.UTF-8 和 export LC_ALL=en_US.UTF-8
然后怎么在Mac浏览器查看tensorboard呢?
输入主机IP地址:6006就可以啦。
6.tensorflow报错 Key Conv/biases not found in checkpoint
将保存模型的文件夹里面已有的模型删去,保持文件夹为空就好了。
7.从tensorflow中取图片和label显示出来总是不匹配,原因就是:sess.run每一次都会取一个batch,如果是分成两次取,那么img和label就会不匹配,所以说,要同时取img和label.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值