2018年3月1日 星期四
2018年2月21日 星期三
Python 3 教程
http://www.runoob.com/python3/python3-tutorial.html
http://glophy.com/index.php/2014-01-26-07-09-30
http://glophy.com/index.php/2014-01-26-07-09-30
Python去除列表list重複或相似元素的方法
http://www.sijitao.net/2441.html
def remove_similar ( lists , similarity = 0.9 ): i = 0 l = len ( lists ) while i < l : j = i + 1 while j < l : seq = difflib . SequenceMatcher ( None , lists [ i ], lists [ j ]) ratio = seq . ratio () if ratio >= similarity : del lists [ j ] l = l - 1 else : j += 1 i += 1 return lists
2018年1月30日 星期二
OpenCV程序在Debug時出現「PDB文件無法加載」
原文網址:https://read01.com/xmxRx.html
2018年1月23日 星期二
Tensorflow 1.4 gpu版 安裝步驟
0.安裝Pycharm 2017.1.5
1.安裝cuda_8.0.61_win10.exe
2.下載cudnn-8.0-windows10-x64-v6.0,
將bin, lib, include裡面檔案放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\xxx
3.安裝Anaconda3-4.1.1-Windows-x86_64.exe
安裝到C:\Anaconda3
4.Anaconda Prompt (or CMD)
conda create -n tensorflow-gpu python=3.5.2
activate tensorflow-gpu (activate後的動作都會安裝到C:\Anaconda3\envs\tensorflow-gpu裡面的python套件管理)
pip install tensorflow-gpu keras pillow h5py (如果有缺套件一樣從這邊新增, 可用pip list檢查)
5.pycharm new project
Interpreter : C:\Anaconda3\envs\tensorflow-gpu\python.exe (應該會需要一點時間,pycharm右下角 Background Task)
# 參考網址 http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html
# 版本需對應 cuda8 + cuDNN v6
1.安裝cuda_8.0.61_win10.exe
2.下載cudnn-8.0-windows10-x64-v6.0,
將bin, lib, include裡面檔案放到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\xxx
3.安裝Anaconda3-4.1.1-Windows-x86_64.exe
安裝到C:\Anaconda3
4.Anaconda Prompt (or CMD)
conda create -n tensorflow-gpu python=3.5.2
activate tensorflow-gpu (activate後的動作都會安裝到C:\Anaconda3\envs\tensorflow-gpu裡面的python套件管理)
pip install tensorflow-gpu keras pillow h5py (如果有缺套件一樣從這邊新增, 可用pip list檢查)
5.pycharm new project
Interpreter : C:\Anaconda3\envs\tensorflow-gpu\python.exe (應該會需要一點時間,pycharm右下角 Background Task)
# 參考網址 http://blog.nitishmutha.com/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html
# 版本需對應 cuda8 + cuDNN v6
Tensorflow 1.5rc1 build on windows10
Tensorflow 1.4 只能用cuda 8
visual studio 2017 只能搭配cuda 9
cuda 8 需要用到 visual studio 2015的runtime
visual studio 2015的runtime跟visual studio 2017無法共存
因此 Tensorflow 1.4 跟 visual studio 2017 無法共存...
所以預計使用Tensorflow 1.5rc1, 但因為是prebuild, 沒有windows版本的
所以要自行從source code安裝
https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake
download CMake, Git, SWIG, cuDNN 9.1, cuda9
.... 2018/1/23 編譯失敗,版本匹配問題仍多,暫時放棄等待新版本tensorflow套件
visual studio 2017 只能搭配cuda 9
cuda 8 需要用到 visual studio 2015的runtime
visual studio 2015的runtime跟visual studio 2017無法共存
因此 Tensorflow 1.4 跟 visual studio 2017 無法共存...
所以預計使用Tensorflow 1.5rc1, 但因為是prebuild, 沒有windows版本的
所以要自行從source code安裝
https://github.com/tensorflow/tensorflow/tree/r0.12/tensorflow/contrib/cmake
Pre-requisites
- CMake version 3.5 up to 3.6
- Additional pre-requisites for Microsoft Windows:
- Visual Studio 2015
- Python 3.5
- NumPy 1.11.0 or later
- Additional pre-requisites for Linux:
- Python 2.7 or later
- Docker (for automated testing)
- NumPy 1.11.0 or later
download CMake, Git, SWIG, cuDNN 9.1, cuda9
.... 2018/1/23 編譯失敗,版本匹配問題仍多,暫時放棄等待新版本tensorflow套件
訂閱:
文章 (Atom)