My laptop supports CUDA do I still need AWS set up?

Ptilulu,

I did the lessons on local Nvidia GPU with Ubuntu Linux. It is slow but do-able.

lin

1 Like

Hi Elle_Idan,

What laptop are you using, and are you running Windows or Linux (which Linux)

Thanks,

Michael

My laptop also has Nvidia GPU GForce GT 630M. As you can see, it is an old model and so, when I run Lesson 1, it works for samples but not when I try to run the entire dataset. My gpu has only 512 Mb memory and I saw in a post from @Jeremy that a good value is at least 4 Gb. So, I am going to use AWS once that I ever get memory issues cause not enough memory available.

Hi Michael,

My laptop is a custom built one. It has Intel i7-6700-HQ CPU @2.6GHz and 32 GB RAM

OS is Windows 10 PRO.

Graphics card is NVidia GeForce GTX 965M

I also plan to use the onboard GPU NVIDIA GEFORCE 940MX. I tried installing cygwin
GIT did not install. Now I am stuck with a cygwin 64 console app which I am not able to uninstall.
Detailed instructions on how to install cygwin with Git would be of tremendous help.

Regards

I’m working currently on windows 10 using a similar setup, I’ll make a video tutorial for this eventually, but until then if you have problems just ask and I will try to help.

1 Like

Thanks Shawn. Will go through ang get back in case I face any problems.

I have a Nvidia Geforce 940MX GPU which has 4GB RAM. Will this suffice? I am asking because you mention a 12GB RAM
GPU in the Hardware section of the instructions.

Yeah, 4GB is fine. I have gtx 980’s as well, deeplearning still works fine.

Shawn,

I successfully followed the installation instructions up till theano.
On execution of git clone https://github.com/Theano/Theano.git theano-0.8.2 --branch rel-0.8.2 , I am getting the
error
’git’ is not recognized as an internal or external command,
operable program or batch file.

It appears git is not installed. Please let me know from where I can get the git and where should I install it.

Thanks

Hey Sunil,

You can get git here https://git-scm.com/

1 Like

@tapashettisr

I believe @ that point in the guide you should have a mingw setup. press windows button -> type git bash , use this shell from now on. If you don’t have it elle_idan has linked it above.

Shawn,

I have been able to install theano. However after creating the system environment variables THEANO_FLAGS_CPU and
THEANO_FLAGS_GPU, on running
env | grep -i theano I find that the these variables are not shown on the git bash shell. Instead I am getting an output as

$ env | grep -i theano
PWD=/c/Users/TAPASHETTI-SR/toolkits/theano-0.8.2

Do we need to create THEANO_FLAGS sysenv variable as well in addition to the two I mentioned above and how to set this variable value?

Regards

Make sure you restart the shell after you export new system environment variables. I believe you can use both the export syntax from within the bash shell as well as my preference, which is to use the windows gui utility. I have pasted a copy of my environment variables in another thread: [Help] Alternatives to AWS and Microsoft Azure

Take a look at those and make sure they match up. Note the value for cnmem is debatable, you can get memory errors if its too high. For my 4gb cards I think I was running it around ~.65-70

Bottom line, those values should show up in your shell.

Shawn,

I am getting the following output on running $ python cpu_gpu_test.py :

$ python openblas_test.py
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe cute optimized C-implementations (for both CPU and GPU) and will default to Pyth on implementations. Performance will be severely degraded. To remove this warnin g, set Theano flags cxx to an empty string.
(‘blas.ldflags=’, ‘’)
numpy time: 0.328000[s], theano time: 0.344000[s] (times should be close when ru n on CPU!)
Result difference: 0.000000

It appears I missed something on the way in installing dependencies. Do I need to reinstall mingw?

Seems like it can’t find the g++ compiler. Look into installing msys, which goes with mingw. Using the mingw-get commands to accomplish this is the best way I think. I suggest you install mingw directly into the root directory. c:\mingw. Could also be an environment variable issue, I forget all the ones in play here, but I have a mingw home setup. http://www.mingw.org/wiki/getting_started

1 Like

Shawn,

Sorry for bothering you again. I have had some experience with MATLAB and Python but am new to complex things like
getting multiple dependancies right.

When I run THEANO_FLAGS = THEANO_FLAGS_CPU in the git bash some times it works while at other times I get the following error:

$ THEANO_FLAGS = THEANO_FLAGS_CPU
bash: THEANO_FLAGS: command not found

I tried exiting and restarting git bash as well. What is the issue?

Sorry, It was a syntax error. Running OK now.

1 Like

Shawn,

I installed Keras successfully. However on running the example python mnist_cnn.py it looks like it is looking for tensorflow instead of theano. Is there any other example which calls theano instead of thensorflow ? The bash output is as follows:

$ python mnist_cnn.py
Using TensorFlow backend.
Traceback (most recent call last):
** File “mnist_cnn.py”, line 12, in **
** from keras.datasets import mnist**
** File “C:\Users\TAPASHETTI-SR\toolkits\anaconda2-4.2.0\lib\site-packages\keras-1.1.0-py2.7.egg\keras_init_.py”, line 2, in **
** from . import backend**
** File “C:\Users\TAPASHETTI-SR\toolkits\anaconda2-4.2.0\lib\site-packages\keras-1.1.0-py2.7.egg\keras\backend_init_.py”, line 64, in **
** from .tensorflow_backend import ***
** File “C:\Users\TAPASHETTI-SR\toolkits\anaconda2-4.2.0\lib\site-packages\keras-1.1.0-py2.7.egg\keras\backend\tensorflow_backend.py”, line 1, in **
** import tensorflow as tf**
ImportError: No module named tensorflow

I’ve found another technology stack that’s a bit more recent that works for:

Windows 10 / Visual Studio 2015 / Python 2.7 / Anaconda 4.2.0 / Cuda 8.0.44 / MinGW-w64 5.4.0 / Theano 0.8.2 / Keras 1.1.0 / OpenBlas 0.2.14 (optional) / cuDNN 5.1 (conditional for convolution neural networks)

https://github.com/glyphx/dlwin/blob/master/README.md6 <- I mainly used these instructions, perhaps I will modify them to reflect a few of the idiosyncrasies I found.

http://ankivil.com/installing-keras-theano-and-dependencies-on-windows-10/4 <-- this helped me solve a few problems with the first link.

Namely to modify %USERPROFILE%/.keras/keras.json so that keras uses theano instead of tensorflow:
keras.json

{
“floatx”: “float32”,
“epsilon”: 1e-07,
“image_dim_ordering”: “th”,
“backend”: “theano”
}

I also had memory issues, we’ll see if that goes away when I get my own TitanXP on weds, muhahaha! To resolve the memory problems I had to pass new parameters to THEANO_FLAGS. The author has lib.cnmem=0.8, I had to lower mine to .7 or .65 to avoid crashing or slowdown.

My environment: https://gist.github.com/glyphx/0dd774b25f5ad63fbcbe10a205992d1a3

https://drive.google.com/file/d/0B7OZ3ORJZNOISE95SnIxeFRBa1U/view?usp=sharing1

Somehow I matched the author’s speed results, his titan, vs my 980: https://gist.github.com/glyphx/74dfce1a1736b8d669614a5570db8f863

If anyone implements this and has questions feel free to ask, I think I have a decent working understanding now.

Now that I finally have my environment set and I understand a bit more python it’s time to re-watch the first lessons and implement!