TensorFlow Setup Notes - 00
Original Chinese title: tensorflow折腾小计-00
PyCUDA
Like Glophy Zone Backup mentions, I originally thought that if you already know Python, just learning PyCUDA would be enough to get started with GPU programming. Only when I actually got into the basics and saw a module snippet did I realize it mainly handles data exchange—to really put it to use, you still have to learn CUDA.
Installation Issues
Import error with the GPU version:
On Windows, running “import tensorflow” generates No module named “_pywrap_tensorflow” error - Stack Overflow
TensorFlow Resources – Chinese Edition | | URl-team
CUDA - Wikipedia gives a detailed breakdown of the differences between CUDA versions. The lab’s GTX 480 supports compute capability 2.0. Unfortunately, that’s below the supported threshold, so I swapped it out for a GTX 780. I also have a 1060 6GB at home. Not sure how compute cards compare against gaming GPUs here.
NVIDIA cuDNN | NVIDIA Developer
CUDNN DNN (deep neural networks)
You need this library to train models.
What Raising pool\_size\_limit\_ from means—explained pretty clearly for GPU beginners:
machine learning - How to interpret Poolallocator messages in tensorflow? - Stack Overflow
Downgrading to GCC 4.8 on Ubuntu 16.04 LTS - Linux Tutorial
Ubuntu 16.04 ships with GCC 6, and downgrading to anything below 5 works fine.
Installing GPU TensorFlow on Ubuntu 16.04 (Including CUDA and cuDNN) - Suzhou GDG - SegmentFault
pip3 install nltk requires root privileges to install. Same goes for setuptools—you have to run sudo su.
python - No module named pkg_resources - Stack Overflow
Installing NVIDIA Drivers on Ubuntu 16.04 — if you hit an infinite login loop, uninstalling the driver fixes it.
Even better: run Ubuntu Server without a GUI. It flies.
PyCUDA
Glophy Zone Backup 和这篇文章一样,以为会用python的情况下,只需要学会pycuda就可以入门GPU。看到入门的时候发现一段module的时候才发现其实提供的数据交换,真正运用到了还是需要学习CUDA。
安装的问题
GPU版本import的时候报错
On Windows, running “import tensorflow” generates No module named “_pywrap_tensorflow” error - Stack Overflow
TensorFlow 资源大全–中文版 | | URl-team
CUDA - Wikipedia 详细介绍了cuda各个版本的区别。实验室的GTX 480版本支持2.0。可惜的并不是在支持的版本之上,换了一块780。家里还有一块1060 6G。不知道计算显卡和游戏显卡的对比
NVIDIA cuDNN | NVIDIA Developer
CUDNN DNN(deep neural networks)
训练模型需要这个模块。
Raising pool_size_limit_ from 的意义,对于GPU入门的人解释的比较清楚
machine learning - How to interpret Poolallocator messages in tensorflow? - Stack Overflow
ubuntu 16.04 LTS降级安装gcc 4.8 - Linux系统教程
16.04 的ubuntu gcc版本是6,其实降到5一下就可以。
Ubuntu16.04 下安装GPU版TensorFlow(包括Cuda和Cudnn) - 苏州谷歌开发者社区 - SegmentFault
Pip3 install nltk 需要root才能安装。setuptools也是 必须是sudo su
python - No module named pkg_resources - Stack Overflow
Ubuntu 16.04 安装英伟达(Nvidia)显卡驱动如果遇到无限返回登录的问题,卸载驱动之后就可以。
比较好的是ubuntu server不要图形界面。跑起来飞快。