<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Amblizer on Medium]]></title>
        <description><![CDATA[Stories by Amblizer on Medium]]></description>
        <link>https://medium.com/@Amblizer?source=rss-5018e292e3dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HzamAPg_PKLGYXaK2QxO0Q.png</url>
            <title>Stories by Amblizer on Medium</title>
            <link>https://medium.com/@Amblizer?source=rss-5018e292e3dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:24:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Amblizer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Painful installation of Cuda, Tensorflow, and keras on Windows 10, and finally all done]]></title>
            <link>https://medium.com/@Amblizer/painful-installation-of-cuda-tensorflow-and-keras-on-windows-10-and-finally-all-done-75f3ade4b01a?source=rss-5018e292e3dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/75f3ade4b01a</guid>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Amblizer]]></dc:creator>
            <pubDate>Wed, 19 Jul 2017 13:45:45 GMT</pubDate>
            <atom:updated>2017-07-19T13:53:31.742Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve tried months ago to install the GPU-based Machine learning framework, namely keras with tensorflow, but get stuck following the official indication of the latter, and the issue remained unresolved until yesterday because of loads of patients in summer vocation, and I finally managed to get m1000m working.</p><p>I basically followed instructions written in Chinese in <a href="http://blog.csdn.net/u012898521/article/details/69611800">http://blog.csdn.net/u012898521/article/details/69611800</a>, with a few modifications according to keras documentation in Chinese <a href="http://keras-cn.readthedocs.io/en/latest/for_beginners/keras_windows/#_4">HERE</a>, and actually I did a combination of both.</p><h3>Step 1 — python</h3><p>By far tensorflow only support python 3 but no newer than major version of 3.5, and last time I got a lot of trouble tried to install the dependencies especially scipy. I didn’t use anaconda because it starts rather slow and Google said you could install tensorflow without it, and it was later I found scipy itself WILL encounter problems when installed on windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*43v3DzBJVF82O_GQDB8mRQ.png" /></figure><p><strong>SO, just install Anaconda with python 3.5 (I installed Anaconda 4.2.0 with python 3.5.2) </strong><a href="https://repo.continuum.io/archive/index.html"><strong>HERE</strong></a><strong>, and it will save you all the troubles.</strong></p><h3>Step 2 — CUDA and CuDNN</h3><p>CUDA is toolkit enables you to all the fun programming with NVIDIA GPU, you’re welcomed unless your GPU is prior to GTX 5XX.</p><p>You can download it <a href="https://developer.nvidia.com/cuda-downloads">HERE</a>, and you’ll find it a bit of time consuming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*dXF8G8kteyqdu3IqIazd8w.png" /></figure><p>Installation is simple a series of ‘Next’s.</p><p>And now you can install CuDNN, an acceleration library for CUDA. You’ll require to signed a developer account in order to get it <a href="https://developer.nvidia.com/cudnn">HERE</a>, and then unzip the folders and overwrite folders at</p><pre>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\8.0 </pre><p>with same names.</p><h3>Step 3 — Tensorflow</h3><p>Simply use pip with installation.</p><p>To install CPU version(required)</p><pre>&gt;pip install tensorflow</pre><p>To install GPU version(optional)</p><pre>&gt;pip install tensorflow-gpu</pre><p>If it says pip is outdated or cannot find resource,try upgrading pip</p><pre>python.exe -m pip install — upgrade pip</pre><p>Then, test with import and it should not return any errors</p><pre>&gt;python</pre><pre>&gt;&gt;&gt;import tensorflow as tf</pre><h3>Step 4 — Keras</h3><p>A line of code will do</p><pre>pip install keras</pre><p>Keras will be installed with theano by default, but it will use tensorflow as the back-end, so don’t panic, and test if keras is installed correctly by</p><pre>import keras</pre><p>Now we could run the MNIST example in Keras with either CPU or GPU</p><h3>Step 4 — Run and switch between CPU and GPU</h3><p>Download keras testing data sets <a href="https://github.com/fchollet/keras.git">HERE</a>, or if you have git run</p><pre>git clone <a href="https://github.com/fchollet/keras.git">https://github.<strong>com</strong>/fchollet/keras.git</a></pre><p>Locate at <strong>keras/examples/</strong>, and run <strong>mnist_mlp.py</strong>, if you installed CUDA and CuDNN correctly, it will run on GPU by default, and here’s my running on GPU:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbv0342YQhXq60Sy3N1XRw.png" /></figure><p>Sadly I have only a M1000M on a laptop, whose performance is compromised. 😭</p><p>If you want to know how it will be on using CPU, you may Googled and get a suggestion to ‘deploy <strong>os.environ[“CUDA_VISIBLE_DEVICES”] = “” </strong>’, which you may well find vitiate.</p><p>And here’s the trick, simply change the value to -1 will do. More specifically, add these two lines whenever you want to run it on CPU:</p><pre>import os</pre><pre>os.environ[“CUDA_VISIBLE_DEVICES”] = ‘-1’</pre><p>My i7–6850HQ runs two times slower than the ‘weak’ GPU M1000M</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-maSifC2J2LtFjNSaDUJw.png" /></figure><p>Finally, we have GPU based computer😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75f3ade4b01a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>