国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

Keras configuration (GPU version, based on GTX108

hzc / 2723人閱讀

This is my first blog about machine learning.( ?? ω ?? )y

To begin with,the most important thing is to configure a group of proper tools and develope environments.
Keras is a well recommended framework by google, which can either supported by tensorflow and theano. Due to the excellent optimization by nvidia, the latest version of nv gamer graphics card (gtx10x0,titan xp)can also largely extend the efficiency of network training. So if one of the card is available, a GPU version of Keras is recommended.

My graphics card is GTX1080, the operating system is windows10 X64.

1. Microsoft Visual Studio 2015

Firstly, if you want to install a GPU version of machine learning framework, a Microsoft visual studio is needed. The version of Microsoft vs(also the CUDA Toolkit mentioned below) depends on your graphics card. If your card doesn"t belong to one of the latest NVidia version (gtx10x0,titan xp),then visual studio 2010~2013 is strongly recommended, because vs2015 is only compatible with cuda8.0,which is the only CUDA version supported by GTX1080. Due to my GTX1080, I"ve chosen vs2015 as my version, which can be de directly downloaded at the following link:

http://download.microsoft.com...

It"s a community version, totally free for individual developer.

The installation of vs2015 is so simple, load the iso file and click the execution file just like all other software.

VS2015 will automatically configure the environment without needing more Settings.

2. Anaconda2 4.4.0

To run Keras framework, a python environment is also needed. You can directly find the open source codes of python on GitHub, but I recommend Anaconda, for it has already integrated a lot of third-party libs (numpy, scipy, matplotlib, ipython, spyder.....). There are 2 version of Anaconda can be accessed, corresponding to python2+ and python3+. I took anaconda2(python2.7 version) as my choise. If you need to do text procession works, py3+ is recommended.

Download it from official site: https://www.continuum.io/down...

It can also be downloaded from the archive of the open source share site of Tsinghua university, choose anaconda2 4.4.0 if you choose python2.7 as environment:
https://mirrors.tuna.tsinghua...

Downloading from the latter can speed up a lot if you are in mainland CHINA.

When installing anaconda, don"t forget add the folder of anaconda scripts and libs to the environment variables.

3. Gcc compiler

Since we chose GPU version of Keras as our derivation machine, a g++ is indispensable.
open command line (win+R, cmd)and tap in the code:

conda install mingw libpython

4. CUDA Toolkit 8.0

It"s the core part if you want to use your powerful GPU to do the batch calculation and derivation.
CUDA Toolkit is provided by NVIDIA to support GPU oriented programming, which is only valid for graphics cards of NVIDIA but not AMD or Intel graphics products. If you have no NVIDIA graphics card, CPU version of Keras deep learning framework can be used.

Go to NVIDIA official site to download CUDA Toolkit, choose your version of operating system.
https://developer.nvidia.com/...

5. install Theano/Tensorflow

Open the CMD, tap in the code one by one:

#Which torch you wanna choose? Theano or Tensorflow?
pip install theano;#pip install tensorflow; 
pip install keras
conda install git
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

6. Configuration

Add the following path into environment variables:

#Change the disk and folder if you"ve already chosen another place
C:Anaconda2;
C:Anaconda2Scripts;
C:Anaconda2MinGWin;
C:Anaconda2MinGWx86_64-w64-mingw32lib;

create a new variable, add in the PATH:

#Change the dick, folder; change "theano" to "tensorflow" if you chose another
C:Anaconda2Libsite-packages	heano;

create a txt file .theanorc.txt at your USER fold, add in the content:

[global]
openmp=False 
device = gpu   
optimizer_including=cudnn  
floatX = float32  
allow_input_downcast=True  
[lib]
cnmem = 0.8 
[blas]
ldflags=  
[gcc]
cxxflags=-ID:Anaconda2MinGW  
[nvcc]
fastmath = True  
--flags=-LD:Anaconda2libs #change it to your own directory
--compiler_bindir=D:Microsoft Visual Studio 12.0VCin #change it to your own directory

#delete all annotation 

Till now, everything has been done.
Open your python environment(cmd or ipython notebook or spyder) and try to import~!

python
import numpy as np
import theano #or "import tensorflow as tf" 
import keras

If you want to do more, try to use keras and nimst database train a multi-layer perceptron model.

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/40772.html

相關文章

  • 用免費TPU訓練Keras模型,速度還能提高20倍!

    摘要:本文介紹了如何利用上的免費資源更快地訓練模型。本文將介紹如何在上使用訓練已有的模型,其訓練速度是在上訓練速度的倍。使用靜態訓練模型,并將權重保存到文件。使用推理模型進行預測。 本文介紹了如何利用 Google Colab 上的免費 Cloud TPU 資源更快地訓練 Keras 模型。很長一段時間以來,我在單個 GTX 1070 顯卡上訓練模型,其單精度大約為 8.18 TFlops。后來谷...

    IamDLY 評論0 收藏0
  • GPU訓練機器學習模型哪家強?AWS、谷歌云、IBM等6大平臺對比

    摘要:在低端領域,在上訓練模型的價格比便宜兩倍。硬件定價價格變化頻繁,但目前提供的實例起價為美元小時,以秒為增量計費,而更強大且性能更高的實例起價為美元小時。 隨著越來越多的現代機器學習任務都需要使用GPU,了解不同GPU供應商的成本和性能trade-off變得至關重要。初創公司Rare Technologies最近發布了一個超大規模機器學習基準,聚焦GPU,比較了幾家受歡迎的硬件提供商,在機器學...

    史占廣 評論0 收藏0
  • 從硬件配置到軟件安裝,一臺深度學習機器的配備指南

    摘要:很明顯這臺機器受到了英偉達的部分啟發至少機箱是這樣,但價格差不多只有的一半。這篇個文章將幫助你安裝英偉達驅動,以及我青睞的一些深度學習工具與庫。 本文作者 Roelof Pieters 是瑞典皇家理工學院 Institute of Technology & Consultant for Graph-Technologies 研究深度學習的一位在讀博士,他同時也運營著自己的面向客戶的深度學習產...

    joywek 評論0 收藏0
  • 使用AMD CPU,3000美元打造自己的深度學習服務器

    摘要:本文作者詳細描述了自己組裝深度學習服務器的過程,從主板電源機箱等的選取到部件的安裝,再到服務器的設置,可謂面面俱到。注本文旨在討論服務器設置及多用戶協作,部件組裝和軟件安裝過程是關于創建自己的的文章的簡化版本。本文作者詳細描述了自己組裝深度學習服務器的過程,從 CPU、GPU、主板、電源、機箱等的選取到部件的安裝,再到服務器的設置,可謂面面俱到。作者指出,組裝者首先要弄清自己的需求,然后根據...

    Vultr 評論0 收藏0

發表評論

0條評論

hzc

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<