Re: [theano-users] cannot compile with cuDNN error when importing theano

2018-04-11 Thread Qinpeng Wang
Hi, Arnaud, 

Thanks for your reply! I believe currently I rely on the gcc from 
m2w64-toolchain package, installed via conda.
Where can I find this file "test.c", and how can I compile with your code?

Thanks!

On Wednesday, April 11, 2018 at 12:18:56 PM UTC-5, Arnaud Bergeron wrote:
>
> It seems like the gcc in anaconda has trouble when installed in a path 
> with spaces:
>
> Can you copy this to 'test.c':
>
> int main() {
> return 1;
> }
>
> and try to compile with:
>
> g++ test.c -o test
>
>
> Le 10 avr. 2018 à 17:19, Qinpeng Wang > 
> a écrit :
>
> Hi, Arnaud, 
>
> Thanks for your reply! I reinstalled CUDA, copied cudnn files in the cuda 
> directory, and removed the two parameters. However, I got the same errors 
> from my first post:
>
> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
> Traceback (most recent call last):
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 227, in 
> use(config.device)
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 214, in use
> init_dev(device, preallocate=preallocate)
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 121, in init_dev
> dnn.dnn_available.msg)
> RuntimeError: You enabled cuDNN, but we aren't able to use it: cannot compile 
> with cuDNN. We got this error:
> b'C:/Program 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  cannot find C:/Program: No such file or directory
> C:/Program 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  cannot find 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o:
>  No such file or directory
> collect2.exe: error: ld returned 1 exit status'
>
>
> Any other suggestion you have?
>
> Thanks!
>
>
> On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron wrote:
>>
>>
>>
>> Le 3 avr. 2018 à 12:01, Qinpeng Wang  a écrit :
>>
>> Hi Pascal, 
>>
>> I have CUDA installed a while ago when I was still using the old GPU 
>> backend at C:\Program Files\NVIDIA GPU Computing Toolkit, then I copied 
>> the CUDA folder to C root. 
>>
>>
>> This most likely broke DLL registrations.  Please don't do that.
>>
>> If you reinstall cuda in its original location, put the cudnn files in 
>> the cuda directory and remove these two parameters in your theanorc file:
>>
>> include_path=C:/CUDA/v7.5/include
>> library_path=C:/CUDA/v7.5/lib/x64
>>
>> It should work again.
>>
>> ---
>>
>> I you really want to try with the current setup, you can try to set this
>>
>> base_path=C:/CUDA/v7.5
>>
>> Instead of the two above, but I'm pretty sure that will still break on 
>> the cuda DLLs.
>>
>>
>>
>> Then I installed cuDNN by copying unzipped files into corresponding 
>> folders inside CUDA folder. I'm using CUDA 7.5 and cuDNN 6.0 (Windows7). 
>> See my theanoc file in my original post to make sure I have pointed theano 
>> to the right location. 
>> Yes this error is not related to Idflags.
>>
>> Thanks!
>>
>> On Tuesday, April 3, 2018 at 9:59:38 AM UTC-5, Pascal Lamblin wrote:
>>>
>>> This is a completely different error message. 
>>> This one has to do with cuDNN, not BLAS or MKL. 
>>>
>>> Where have you installed cuDNN? 
>>> Does _that_ error still happen when you do not ldflags? 
>>>
>>> On 2018-04-03 10:46 AM, Qinpeng Wang wrote: 
>>> > Hi Pascal, 
>>> > 
>>> > Thanks for your reply! 
>>> > I have "mkl-service" package installed via conda (I have versions of 
>>> > installed libraries in my original post), but somehow theano is unable
>>>  
>>> > to locate the BLAS library automatically, hence the warning message. 
>>> > Since the "gcc-v" output seems reasonable, could you please help me 
>>> > figure out how to get rid of the error message in my original post? I 
>>> > attach it here again for your convenience. 
>>> > 
>>> > When I run: 
>>> > |python -c "import theano"| 
>>> > 
>>> > I get this message: 
>>> > 
>>> > |ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
>>>  
>>> > Traceback (most recent call last): File "C:\Program 
>>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
>>>  
>>> > line 227, in  use(config.device) File "C:\Program 
>>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
>>>  
>>> > line 214, in use init_dev(device, preallocate=preallocate) File 
>>> > "C:\Program 
>>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
>>>  
>>> > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You enabled
>>>  
>>> > cuDNN, but we aren't able to use it: cannot compile with cuDNN. We got
>>>  
>>> > this error: b'C:/Program 
>>> > 
>>> Files/Anaconda3/envs/te/Library/mingw-w64/bin/..

Re: [theano-users] cannot compile with cuDNN error when importing theano

2018-04-11 Thread Qinpeng Wang
Hi, Pascal, 

Yes, in my error message there is still such a line about "C:/Program", I 
attach it here again:

ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__i
nit__.py", line 227, in 
use(config.device)
  File "C:\Program Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__i
nit__.py", line 214, in use
init_dev(device, preallocate=preallocate)
  File "C:\Program Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__i
nit__.py", line 121, in init_dev
dnn.dnn_available.msg)
RuntimeError: You enabled cuDNN, but we aren't able to use it: cannot compile 
with cuDNN. We got this error:
b'In file included from C:\\Program Files\\NVIDIA GPU Computing 
Toolkit\\CUDA\\v7.5\\include/driver_types.h:53:0,
 from C:\\Program Files\\NVIDIA GPU Computing 
Toolkit\\CUDA\\v7.5\\include/cudnn.h:63,
from C:\\Users\\Z003RH0H\\AppData\\Local\\Temp\\try_flags_ss3nfk9h.c:4:
C:\\Program Files\\NVIDIA GPU Computing 
Toolkit\\CUDA\\v7.5\\include/host_defines.h:8
4:0: warning: "__cdecl" redefined
 #define __cdecl
 ^\
: note:
 this is the location of the previous definition
C:/Program 
Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 cannot find C:/Program: No such file or directory
C:/Program 
Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
 cannot find 
Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../
../x86_64-w64-mingw32/lib/../lib/default-manifest.o: No such file or directory
collect2.exe: error: ld returned 1 exit status\r\n'


Thanks!

On Wednesday, April 11, 2018 at 12:01:47 PM UTC-5, Pascal Lamblin wrote:
>
> And you _still_ have the following in your error message? 
>  > cannot find C:/Program: No such file or directory 
>
> That is surprising, I don't see where it would get "C:/Program" from. 
>
> On 2018-04-11 08:56 AM, Qinpeng Wang wrote: 
> > Hi Pascal, 
> > 
> > I have got rid of that line a while ago following your advice, here is 
> > my new theanoc file after Arnaud's advice: 
> > 
> > [global] 
> > floatX = float32 
> > device = cuda 
> > 
> > [dnn] 
> > enabled = True 
> > 
> > Thanks! 
> > 
> > 
> > On Tuesday, April 10, 2018 at 4:58:33 PM UTC-5, Pascal Lamblin wrote: 
> > 
> > You _also_ need to remove the incorrect "blas.ldflags" line from 
> > .theanorc. 
> > 
> > On 2018-04-10 05:19 PM, Qinpeng Wang wrote: 
> >  > Hi, Arnaud, 
> >  > 
> >  > Thanks for your reply! I reinstalled CUDA, copied cudnn files in 
> the 
> >  > cuda directory, and removed the two parameters. However, I got 
> > the same 
> >  > errors from my first post: 
> >  > 
> >  > |ERROR (theano.gpuarray): Could not initialize pygpu, support 
> > disabled 
> >  > Traceback (most recent call last): File "C:\Program 
> >  > 
> > 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> >  > line 227, in  use(config.device) File "C:\Program 
> >  > 
> > 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> >  > line 214, in use init_dev(device, preallocate=preallocate) File 
> >  > "C:\Program 
> >  > 
> > 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> >  > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You 
> > enabled 
> >  > cuDNN, but we aren't able to use it: cannot compile with cuDNN. 
> > We got 
> >  > this error: b'C:/Program 
> >  > 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  
>
> > 
> >  > cannot find C:/Program: No such file or directory C:/Program 
> >  > 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  
>
> > 
> >  > cannot find 
> >  > 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o:
>  
>
> > 
> >  > No such file or directory collect2.exe: error: ld returned 1 exit 
> > status'| 
> >  > 
> >  > 
> >  > Any other suggestion you have? 
> >  > 
> >  > Thanks! 
> >  > 
> >  > 
> >  > On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron 
> > wrote: 
> >  > 
> >  > 
> >  > 
> >  >> Le 3 avr. 2018 à 12:01, Qinpeng Wang  >  >> > a écrit : 
> >  >> 
> >  >> Hi Pascal, 
> >  >> 
> >  >> I have CUDA installed a while ago when I was still using the 
> > old 
> >  >> GPU backend at C:\Program Files\NVIDIA GPU Computing 
> > Toolkit, then 
> >  >> I copied the CUD

[theano-users] Need help with running simultaneously three neural network scripts

2018-04-11 Thread ivan . d . marroquin
Hi all,

I have a windows machine with a kepler card. On this machine, I installed 
Conda 4.3.30 and theano 0.9.0 (along with its required packages). 

I used neupy package as a front end to theano for implementing the neural 
network to train.

I would like to run simultaneously three scripts - each of them trains the 
same neural network architecture on three different data sets. My first 
approach was to open three conda terminals to run the scripts. 

So, I let the first script to work for a short moment and then, I ran the 
second script. While I am waiting to run the third script, I noticed that 
the second script stopped and there was the following message on the conda 
terminal used to run the first script:

 WARNING (theano.gof.compilelock): Overriding existing lock by dead process 
'13168' (I am process '11140')

The first script just continued working.

any suggestion on how to solve this? or, on how to run several scripts 
simultaneously?

many thanks,

Ivan

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [theano-users] theano scan inner function arguments and huge list for taps in sequences and outputs_info

2018-04-11 Thread Caroline Etienne
Ok thank you for your answer Pascal !

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [theano-users] cannot compile with cuDNN error when importing theano

2018-04-11 Thread Arnaud Bergeron
It seems like the gcc in anaconda has trouble when installed in a path with 
spaces:

Can you copy this to 'test.c':

int main() {
return 1;
}

and try to compile with:

g++ test.c -o test


> Le 10 avr. 2018 à 17:19, Qinpeng Wang  a écrit :
> 
> Hi, Arnaud, 
> 
> Thanks for your reply! I reinstalled CUDA, copied cudnn files in the cuda 
> directory, and removed the two parameters. However, I got the same errors 
> from my first post:
> 
> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
> Traceback (most recent call last):
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 227, in 
> use(config.device)
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 214, in use
> init_dev(device, preallocate=preallocate)
>   File "C:\Program 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", line 
> 121, in init_dev
> dnn.dnn_available.msg)
> RuntimeError: You enabled cuDNN, but we aren't able to use it: cannot compile 
> with cuDNN. We got this error:
> b'C:/Program 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  cannot find C:/Program: No such file or directory
> C:/Program 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  cannot find 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o:
>  No such file or directory
> collect2.exe: error: ld returned 1 exit status'
> 
> Any other suggestion you have?
> 
> Thanks!
> 
> 
> On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron wrote:
> 
> 
>> Le 3 avr. 2018 à 12:01, Qinpeng Wang > a écrit :
>> 
>> Hi Pascal, 
>> 
>> I have CUDA installed a while ago when I was still using the old GPU backend 
>> at C:\Program Files\NVIDIA GPU Computing Toolkit, then I copied the CUDA 
>> folder to C root. 
> 
> This most likely broke DLL registrations.  Please don't do that.
> 
> If you reinstall cuda in its original location, put the cudnn files in the 
> cuda directory and remove these two parameters in your theanorc file:
> include_path=C:/CUDA/v7.5/include
> library_path=C:/CUDA/v7.5/lib/x64
> It should work again.
> 
> ---
> 
> I you really want to try with the current setup, you can try to set this
> base_path=C:/CUDA/v7.5
> Instead of the two above, but I'm pretty sure that will still break on the 
> cuda DLLs.
> 
> 
> 
>> Then I installed cuDNN by copying unzipped files into corresponding folders 
>> inside CUDA folder. I'm using CUDA 7.5 and cuDNN 6.0 (Windows7). See my 
>> theanoc file in my original post to make sure I have pointed theano to the 
>> right location. 
>> Yes this error is not related to Idflags.
>> 
>> Thanks!
>> 
>> On Tuesday, April 3, 2018 at 9:59:38 AM UTC-5, Pascal Lamblin wrote:
>> This is a completely different error message. 
>> This one has to do with cuDNN, not BLAS or MKL. 
>> 
>> Where have you installed cuDNN? 
>> Does _that_ error still happen when you do not ldflags? 
>> 
>> On 2018-04-03 10:46 AM, Qinpeng Wang wrote: 
>> > Hi Pascal, 
>> > 
>> > Thanks for your reply! 
>> > I have "mkl-service" package installed via conda (I have versions of 
>> > installed libraries in my original post), but somehow theano is unable 
>> > to locate the BLAS library automatically, hence the warning message. 
>> > Since the "gcc-v" output seems reasonable, could you please help me 
>> > figure out how to get rid of the error message in my original post? I 
>> > attach it here again for your convenience. 
>> > 
>> > When I run: 
>> > |python -c "import theano"| 
>> > 
>> > I get this message: 
>> > 
>> > |ERROR (theano.gpuarray): Could not initialize pygpu, support disabled 
>> > Traceback (most recent call last): File "C:\Program 
>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
>> > line 227, in  use(config.device) File "C:\Program 
>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
>> > line 214, in use init_dev(device, preallocate=preallocate) File 
>> > "C:\Program 
>> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
>> > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You enabled 
>> > cuDNN, but we aren't able to use it: cannot compile with cuDNN. We got 
>> > this error: b'C:/Program 
>> > Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> >  
>> > cannot find C:/Program: No such file or directory C:/Program 
>> > Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>> >  
>> > cannot find 
>> > Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_

Re: [theano-users] cannot compile with cuDNN error when importing theano

2018-04-11 Thread Pascal Lamblin

And you _still_ have the following in your error message?
> cannot find C:/Program: No such file or directory

That is surprising, I don't see where it would get "C:/Program" from.

On 2018-04-11 08:56 AM, Qinpeng Wang wrote:

Hi Pascal,

I have got rid of that line a while ago following your advice, here is 
my new theanoc file after Arnaud's advice:


[global]
floatX = float32
device = cuda

[dnn]
enabled = True

Thanks!


On Tuesday, April 10, 2018 at 4:58:33 PM UTC-5, Pascal Lamblin wrote:

You _also_ need to remove the incorrect "blas.ldflags" line from
.theanorc.

On 2018-04-10 05:19 PM, Qinpeng Wang wrote:
 > Hi, Arnaud,
 >
 > Thanks for your reply! I reinstalled CUDA, copied cudnn files in the
 > cuda directory, and removed the two parameters. However, I got
the same
 > errors from my first post:
 >
 > |ERROR (theano.gpuarray): Could not initialize pygpu, support
disabled
 > Traceback (most recent call last): File "C:\Program
 >
Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
 > line 227, in  use(config.device) File "C:\Program
 >
Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
 > line 214, in use init_dev(device, preallocate=preallocate) File
 > "C:\Program
 >
Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py",
 > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You
enabled
 > cuDNN, but we aren't able to use it: cannot compile with cuDNN.
We got
 > this error: b'C:/Program
 >

Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:

 > cannot find C:/Program: No such file or directory C:/Program
 >

Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:

 > cannot find
 >

Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o:

 > No such file or directory collect2.exe: error: ld returned 1 exit
status'|
 >
 >
 > Any other suggestion you have?
 >
 > Thanks!
 >
 >
 > On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron
wrote:
 >
 >
 >
 >>     Le 3 avr. 2018 à 12:01, Qinpeng Wang >     > a écrit :
 >>
 >>     Hi Pascal,
 >>
 >>     I have CUDA installed a while ago when I was still using the
old
 >>     GPU backend at C:\Program Files\NVIDIA GPU Computing
Toolkit, then
 >>     I copied the CUDA folder to C root.
 >
 >     This most likely broke DLL registrations.  Please don't do that.
 >
 >     If you reinstall cuda in its original location, put the cudnn
files
 >     in the cuda directory and remove these two parameters in your
 >     theanorc file:
 >
 >     |include_path=C:/CUDA/v7.5/include
library_path=C:/CUDA/v7.5/lib/x64|
 >
 >     It should work again.
 >
 >     ---
 >
 >     I you really want to try with the current setup, you can try
to set this
 >
 >     |base_path=C:/CUDA/v7.5 |
 >
 >     Instead of the two above, but I'm pretty sure that will still
break
 >     on the cuda DLLs.
 >
 >
 >
 >>     Then I installed cuDNN by copying unzipped files into
 >>     corresponding folders inside CUDA folder. I'm using CUDA 7.5
and
 >>     cuDNN 6.0 (Windows7). See my theanoc file in my original
post to
 >>     make sure I have pointed theano to the right location.
 >>     Yes this error is not related to Idflags.
 >>
 >>     Thanks!
 >>
 >>     On Tuesday, April 3, 2018 at 9:59:38 AM UTC-5, Pascal
Lamblin wrote:
 >>
 >>         This is a completely different error message.
 >>         This one has to do with cuDNN, not BLAS or MKL.
 >>
 >>         Where have you installed cuDNN?
 >>         Does _that_ error still happen when you do not ldflags?
 >>
 >>         On 2018-04-03 10:46 AM, Qinpeng Wang wrote:
 >>         > Hi Pascal,
 >>         >
 >>         > Thanks for your reply!
 >>         > I have "mkl-service" package installed via conda (I have
 >>         versions of
 >>         > installed libraries in my original post), but somehow
theano
 >>         is unable
 >>         > to locate the BLAS library automatically, hence the
warning
 >>         message.
 >>         > Since the "gcc-v" output seems reasonable, could you
please
 >>         help me
 >>         > figure out how to get rid of the error message in my
 >>         original post? I
 >>         > attach it here again for your convenience.
 >>         >
 >>         > When I run:
 >>         > |python -c "import theano"|
 >>      

Re: [theano-users] theano scan inner function arguments and huge list for taps in sequences and outputs_info

2018-04-11 Thread Pascal Lamblin
That's not really possible unfortunately, in particular because each 
sequence and intermediate output needs to be a tensor (so the 
concatenation is a tensor with 1 more dimension).


On 2018-04-11 08:17 AM, Caroline Etienne wrote:

Hello,

I would like to have one variable representing the huge list of 
TensorVariable provided with dic_in and dic_out. But I don't manage to 
do that with the inner function of theano scan.


|
||def|inner_function(dic_in, dic_out, *args)|||:|
| input_t0, input_t1, input_t2 = ||dic_in
|| cell_tm1, cell_tm2, cell_tm3 = 
||dic_out||

|


|and not

|
|||def|inner_function(input_t0, input_t1, input_t2, cell_tm1, cell_tm2, 
cell_tm3, *args):

|


|
|
nb_time_steps =3
jump_step =1
step_list_in =[i fori inrange(0,nb_time_steps,jump_step)]
step_list_out =[i fori inrange(-nb_time_steps,0,jump_step)]


dic_in ={'input':sequences,'taps':step_list_in}
dic_out ={'initial':cell_init,'taps':step_list_out}
|non_seqs| =

results, updates=theano.scan(fn=inner_function,sequences 
=[dic_in], outputs_info =[dic_out],
   
go_backwards=self.backwards,truncate_gradient=self.gradient_steps,

                                   non_sequences =non_seqs,strict=True)[0]

|

Would someone have some ideas ?

Thank you !

--

---
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+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Pascal Lamblin

--

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [theano-users] cannot compile with cuDNN error when importing theano

2018-04-11 Thread Qinpeng Wang
Hi Pascal, 

I have got rid of that line a while ago following your advice, here is my 
new theanoc file after Arnaud's advice:

[global]
floatX = float32
device = cuda

[dnn]
enabled = True

Thanks!


On Tuesday, April 10, 2018 at 4:58:33 PM UTC-5, Pascal Lamblin wrote:
>
> You _also_ need to remove the incorrect "blas.ldflags" line from 
> .theanorc. 
>
> On 2018-04-10 05:19 PM, Qinpeng Wang wrote: 
> > Hi, Arnaud, 
> > 
> > Thanks for your reply! I reinstalled CUDA, copied cudnn files in the 
> > cuda directory, and removed the two parameters. However, I got the same 
> > errors from my first post: 
> > 
> > |ERROR (theano.gpuarray): Could not initialize pygpu, support disabled 
> > Traceback (most recent call last): File "C:\Program 
> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> > line 227, in  use(config.device) File "C:\Program 
> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> > line 214, in use init_dev(device, preallocate=preallocate) File 
> > "C:\Program 
> > Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> > line 121, in init_dev dnn.dnn_available.msg) RuntimeError: You enabled 
> > cuDNN, but we aren't able to use it: cannot compile with cuDNN. We got 
> > this error: b'C:/Program 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  
>
> > cannot find C:/Program: No such file or directory C:/Program 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  
>
> > cannot find 
> > 
> Files/Anaconda3/envs/te/Library/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o:
>  
>
> > No such file or directory collect2.exe: error: ld returned 1 exit 
> status'| 
> > 
> > 
> > Any other suggestion you have? 
> > 
> > Thanks! 
> > 
> > 
> > On Tuesday, April 10, 2018 at 12:45:59 PM UTC-5, Arnaud Bergeron wrote: 
> > 
> > 
> > 
> >> Le 3 avr. 2018 à 12:01, Qinpeng Wang  >> > a écrit : 
> >> 
> >> Hi Pascal, 
> >> 
> >> I have CUDA installed a while ago when I was still using the old 
> >> GPU backend at C:\Program Files\NVIDIA GPU Computing Toolkit, then 
> >> I copied the CUDA folder to C root. 
> > 
> > This most likely broke DLL registrations.  Please don't do that. 
> > 
> > If you reinstall cuda in its original location, put the cudnn files 
> > in the cuda directory and remove these two parameters in your 
> > theanorc file: 
> > 
> > |include_path=C:/CUDA/v7.5/include 
> library_path=C:/CUDA/v7.5/lib/x64| 
> > 
> > It should work again. 
> > 
> > --- 
> > 
> > I you really want to try with the current setup, you can try to set 
> this 
> > 
> > |base_path=C:/CUDA/v7.5 | 
> > 
> > Instead of the two above, but I'm pretty sure that will still break 
> > on the cuda DLLs. 
> > 
> > 
> > 
> >> Then I installed cuDNN by copying unzipped files into 
> >> corresponding folders inside CUDA folder. I'm using CUDA 7.5 and 
> >> cuDNN 6.0 (Windows7). See my theanoc file in my original post to 
> >> make sure I have pointed theano to the right location. 
> >> Yes this error is not related to Idflags. 
> >> 
> >> Thanks! 
> >> 
> >> On Tuesday, April 3, 2018 at 9:59:38 AM UTC-5, Pascal Lamblin 
> wrote: 
> >> 
> >> This is a completely different error message. 
> >> This one has to do with cuDNN, not BLAS or MKL. 
> >> 
> >> Where have you installed cuDNN? 
> >> Does _that_ error still happen when you do not ldflags? 
> >> 
> >> On 2018-04-03 10:46 AM, Qinpeng Wang wrote: 
> >> > Hi Pascal, 
> >> > 
> >> > Thanks for your reply! 
> >> > I have "mkl-service" package installed via conda (I have 
> >> versions of 
> >> > installed libraries in my original post), but somehow theano 
> >> is unable 
> >> > to locate the BLAS library automatically, hence the warning 
> >> message. 
> >> > Since the "gcc-v" output seems reasonable, could you please 
> >> help me 
> >> > figure out how to get rid of the error message in my 
> >> original post? I 
> >> > attach it here again for your convenience. 
> >> > 
> >> > When I run: 
> >> > |python -c "import theano"| 
> >> > 
> >> > I get this message: 
> >> > 
> >> > |ERROR (theano.gpuarray): Could not initialize pygpu, 
> >> support disabled 
> >> > Traceback (most recent call last): File "C:\Program 
> >> > 
> >> 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__init__.py", 
> >> > line 227, in  use(config.device) File "C:\Program 
> >> > 
> >> 
> Files\Anaconda3\envs\te\lib\site-packages\theano\gpuarray\__

[theano-users] theano scan inner function arguments and huge list for taps in sequences and outputs_info

2018-04-11 Thread Caroline Etienne
Hello,

I would like to have one variable representing the huge list of 
TensorVariable provided with dic_in and dic_out. But I don't manage to do 
that with the inner function of theano scan.

def inner_function(dic_in, dic_out, *args):
 input_t0, input_t1, input_t2 = dic_in
 cell_tm1, cell_tm2, cell_tm3 = dic_out


and not

def inner_function(input_t0, input_t1, input_t2, cell_tm1, cell_tm2, 
cell_tm3, *args):



nb_time_steps = 3
jump_step = 1
step_list_in = [i for i in range(0, nb_time_steps, jump_step)]
step_list_out = [i for i in range(-nb_time_steps, 0, jump_step)]


dic_in = {'input': sequences, 'taps': step_list_in}
dic_out = {'initial': cell_init, 'taps': step_list_out}
non_seqs = 

results, updates = theano.scan(fn=inner_function, sequences = [dic_in], 
 outputs_info = [dic_out],
  go_backwards=self.backwards, 
truncate_gradient=self.gradient_steps,
  non_sequences = non_seqs, strict=True)[0]


Would someone have some ideas ?

Thank you !

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.