Discussion:
[theano-users] Theano does not optimise CNN
Fraser Robinson
2017-10-02 16:52:14 UTC
Permalink
Hi,

I've been trying to work through Convolutional Neural Networks (LeNet)
<http://deeplearning.net/tutorial/lenet.html#lenet>. At this point I've
just saved the code shared on the site and tried to run it. It runs without
too many issues but the validation error stays at around 89%. I've run for
49,000 iterations and it still ended at roughly 89%. Here's a print out of
the function being called and the first few iterations:

runfile('C:/Users/Fraser/Documents/Python
Practice/DeepLearning/convolutional_mlp.py',
wdir='C:/Users/Fraser/Documents/Python Practice/DeepLearning')
Can not use cuDNN on context None: cannot compile with cuDNN. We got this
error:
In file included from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/host_defines.h:50:0,
from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/driver_types.h:53,
from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/cudnn.h:63,
from
c:\users\fraser\appdata\local\temp\try_flags_muyptb.c:4:
C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/crt/host_defines.h:84:0: warning: "__cdecl"
redefined
#define __cdecl
^
<built-in>: note: this is the location of the previous definition
C:/ProgramData/Anaconda22/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lcudnn
collect2.exe: error: ld returned 1 exit status

Mapped name None to device cuda: GeForce GTX 1080 Ti (0000:23:00.0)
loading data
building the model
C:/Users/Fraser/Documents/Python
Practice/DeepLearning/convolutional_mlp.py:104: UserWarning: DEPRECATION:
the 'ds' parameter is not going to exist anymore as it is going to be
replaced by the parameter 'ws'.
ignore_border=True
C:\ProgramData\Anaconda22\lib\site-packages\nose_parameterized\__init__.py:7:
UserWarning: The 'nose-parameterized' package has been renamed
'parameterized'. For the two step migration instructions, see:
https://github.com/wolever/parameterized#migrating-from-nose-parameterized-to-parameterized
(set NOSE_PARAMETERIZED_NO_WARN=1 to suppress this warning)
"The 'nose-parameterized' package has been renamed 'parameterized'. "
training
training @ iter = 0
epoch 1, minibatch 100/100, validation error 89.130000 %
epoch 1, minibatch 100/100, test error of best model 88.510000 %
training @ iter = 100
epoch 2, minibatch 100/100, validation error 88.710000 %
epoch 2, minibatch 100/100, test error of best model 88.250000 %
training @ iter = 200
epoch 3, minibatch 100/100, validation error 88.720000 %
training @ iter = 300
epoch 4, minibatch 100/100, validation error 88.670000 %
epoch 4, minibatch 100/100, test error of best model 88.090000 %
training @ iter = 400
epoch 5, minibatch 100/100, validation error 88.700000 %
training @ iter = 500
epoch 6, minibatch 100/100, validation error 88.820000 %
training @ iter = 600

As I said, I've left it running for around 500 epochs and it still just
sits around the 88 - 89 mark. I can post more epochs if needed. I really
don't know where to start in debugging this, has anyone else implemented
this tutorial on the same version of theano? Suggestion?

Here's my system:

Windows 10 Pro
AMD Ryzen 7 1800X
GTX 1080ti (only graphics installed - no onboard)

Python
Version: 2.7.13

NumPy
Version: 1.13.1

SciPy
Version: 0.19.1

Nose
Version 1.37

Theano
Version: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-10-11 12:32:23 UTC
Permalink
Try to update Theano to the dev version. Maybe you ended up with the few.
Bad commit that produce wrong results.
Post by Fraser Robinson
Hi,
I've been trying to work through Convolutional Neural Networks (LeNet)
<http://deeplearning.net/tutorial/lenet.html#lenet>. At this point I've
just saved the code shared on the site and tried to run it. It runs without
too many issues but the validation error stays at around 89%. I've run for
49,000 iterations and it still ended at roughly 89%. Here's a print out of
runfile('C:/Users/Fraser/Documents/Python
Practice/DeepLearning/convolutional_mlp.py',
wdir='C:/Users/Fraser/Documents/Python Practice/DeepLearning')
Can not use cuDNN on context None: cannot compile with cuDNN. We got this
In file included from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/host_defines.h:50:0,
from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/driver_types.h:53,
from C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/cudnn.h:63,
from
C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v9.0\include/crt/host_defines.h:84:0: warning: "__cdecl"
redefined
#define __cdecl
^
<built-in>: note: this is the location of the previous definition
cannot find -lcudnn
collect2.exe: error: ld returned 1 exit status
Mapped name None to device cuda: GeForce GTX 1080 Ti (0000:23:00.0)
loading data
building the model
C:/Users/Fraser/Documents/Python
the 'ds' parameter is not going to exist anymore as it is going to be
replaced by the parameter 'ws'.
ignore_border=True
UserWarning: The 'nose-parameterized' package has been renamed
https://github.com/wolever/parameterized#migrating-from-nose-parameterized-to-parameterized
(set NOSE_PARAMETERIZED_NO_WARN=1 to suppress this warning)
"The 'nose-parameterized' package has been renamed 'parameterized'. "
training
epoch 1, minibatch 100/100, validation error 89.130000 %
epoch 1, minibatch 100/100, test error of best model 88.510000 %
epoch 2, minibatch 100/100, validation error 88.710000 %
epoch 2, minibatch 100/100, test error of best model 88.250000 %
epoch 3, minibatch 100/100, validation error 88.720000 %
epoch 4, minibatch 100/100, validation error 88.670000 %
epoch 4, minibatch 100/100, test error of best model 88.090000 %
epoch 5, minibatch 100/100, validation error 88.700000 %
epoch 6, minibatch 100/100, validation error 88.820000 %
As I said, I've left it running for around 500 epochs and it still just
sits around the 88 - 89 mark. I can post more epochs if needed. I really
don't know where to start in debugging this, has anyone else implemented
this tutorial on the same version of theano? Suggestion?
Windows 10 Pro
AMD Ryzen 7 1800X
GTX 1080ti (only graphics installed - no onboard)
Python
Version: 2.7.13
NumPy
Version: 1.13.1
SciPy
Version: 0.19.1
Nose
Version 1.37
Theano
Version: 0.9.0.dev-c697eeab84e5b8a74908da654b66ec9eca4f1291
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...