ubunti16.04安装GPU tensor flow预见的问题

来源:互联网 发布:单片机电子琴 编辑:程序博客网 时间:2024/05/22 04:39

先安装CUDA8以及cuDNN5.1,安装方法与环境配置在CSDN百度,资料很多

问题1:pip安装tensor flow时:

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl

sudo pip install --upgrade $TF_BINARY_URL

出现错误如下:

ReadTimeoutError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Read timed out.

解决办法: 加大超时时间:

sudo pip --default-timeout=100 install --upgrade $TF_BINARY_URL

安装成功

问题二:安装python2版本的tensorflow时,切换系统默认的python版本

update-alternatives --config python


运行tensorflow深度学习google框架6章迁移学习案例出现如下问题:

问题1:

[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes).  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
Traceback (most recent call last):
  File "qianyi.py", line 262, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv[:1] + flags_passthrough))
  File "qianyi.py", line 213, in main
    graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message
解决办法:

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.0.0b2.post2-cp27-none-linux_x86_64.whl

参考链接:http://blog.csdn.net/u014696921/article/details/64921100

(2)Protobuf库有关的问题

tensorflow pip包依赖protobuf pip包的版本为version 3.0.0b2,Protobuf的pip包可以从PyPI下载(当运行pip install protobuf),或者可以升级版本,通过以下命令(python2.7)

# Ubuntu/Linux 64-bit:$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.0.0b2.post2-cp27-none-linux_x86_64.whl
  • 1
  • 2

可以修复以下问题:

[libprotobuf ERROR google/protobuf/src/google/protobuf/io/coded_stream.cc:207] Aprotocol message was rejected because it was too big (more than 67108864 bytes).To increase the limit (or to disable these warnings), seeCodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.


原创粉丝点击