[theano-users] Re: [looking for solution in theano] locally connected layers where the weights are not shared

2016-10-06 Thread Alex Lee
Keras has an implementation of this here:
https://github.com/fchollet/keras/blob/master/keras/layers/local.py

I also implemented my own for the special case of no stride, 'same' padding 
and no dilation:
https://gist.github.com/alexlee-gk/c7fca66945298e69e10a4dad81cbc880


On Thursday, November 19, 2015 at 5:17:12 PM UTC-8, David Warde-Farley 
wrote:
>
> There's nothing in Theano itself for this. The only code I'm aware that 
> can do this is the cuda-convnet wrappers in pylearn2. Those are optimized 
> for Fermi-class (GTX580 etc.) GPUs, so they won't be that speedy on more 
> recent cards, but they should still work.
>
> On Thursday, November 19, 2015 at 3:30:53 PM UTC-5, Md adnan alam khan 
> wrote:
>>
>> I have checked the following thread:
>>
>> https://groups.google.com/forum/#!topicsearchin/theano-users/local$2C$20non-convolutional/theano-users/LYsmR5gFrtA
>>
>> it looks like pylearn2 has that operator-
>>   pylearn2.linear.local_c01b.Local   link:
>> http://deeplearning.net/software/pylearn2/library/linear.html
>>
>> But I think this op is cpu only. 
>> From documentation I found :
>>  "Unlike the other cuda-convnet functionality in pylearn2, this linear 
>> transform has CPU support, provided by TheanoLinear."
>>
>> It would be very helpful for me If I could design similar layer in 
>> theano. So my question is:
>>
>> Does Theano has any op similar to this or is there any way to do 
>> pylearn2.linear.local in GPU?
>>
>> Thanks in Advance
>>
>

-- 

--- 
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] Define constant TensorVariable?

2016-10-06 Thread Pascal Lamblin
On Thu, Oct 06, 2016, daniel hernandez wrote:
> I am starting with theano and for the life of me, I can't figure out how to 
> define a simple TensorVariable whose eval method returns a constant. theano 
> itself defines such variables, for instance
> 
> > E = T.eye(2)
> > type(E)
> 
> theano.tensor.var.TensorVariable
> 
> 
> > E.eval()
> 
> array([[ 1.,  0.],
>[ 0.,  1.]])
> 
> 
> 
> So, what is theano doing under the hood here? how do I assign a constant 
> value to a dscalar x?

Under the hood, it is doing:

>>> f = theano.function(inputs=[], outputs=E)
>>> f()

In this case it works, because the value of E only depends en constants (here, 
2).

> > x = T.dscalar('x')
> > type(x)
> 
> theano.tensor.var.TensorVariable

In that case, you can use the explicit version:
>>> f = theano.function(inputs=[x], outputs=x)
>>> f(3)

or the "eval shortcut"
>>> x.eval({x: 3})

> Also, if someone knows of a reference that answers these basic questions that 
> are not answered in the docs, I would be grateful.

You can start with http://deeplearning.net/software/theano/tutorial/index.html

> 
> 
> daniel
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Frédéric Bastien
Uninstall and reinstall Theano. Uninstall many times. You could have
multiple Theano version that conflict together

Le 6 oct. 2016 17:11, "Rav"  a écrit :

> I'm not sure what you refer to.
> I just run theano from where ever i want (jupyter, terminal, ide)
> Some tips would be helpful
>
> On Thursday, October 6, 2016 at 9:40:03 PM UTC+2, Pascal Lamblin wrote:
>>
>> What is the current directory where you launched Python?
>> You should not try to import theano from inside the theano checkout.
>>
>> On Thu, Oct 06, 2016, Rav wrote:
>> > import theano
>> > Traceback (most recent call last):
>> >   File "", line 1, in 
>> >   File "/Users/BB1/src/theano/theano/__init__.py", line 52, in
>> 
>> > from theano.gof import (
>> >   File "/Users/BB1src/theano/theano/gof/__init__.py", line 38, in
>> 
>> > from theano.gof.cc import \
>> >   File "/Users/BB1/src/theano/theano/gof/cc.py", line 28, in 
>> > from theano.gof import graph
>> > ImportError: cannot import name graph
>> >
>> > --
>> >
>> > ---
>> > 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.
>>
>>
>> --
>> 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.
>

-- 

--- 
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.


[theano-users] Define constant TensorVariable?

2016-10-06 Thread daniel hernandez
Hello,

I am starting with theano and for the life of me, I can't figure out how to 
define a simple TensorVariable whose eval method returns a constant. theano 
itself defines such variables, for instance

> E = T.eye(2)
> type(E)

theano.tensor.var.TensorVariable


> E.eval()

array([[ 1.,  0.],
   [ 0.,  1.]])



So, what is theano doing under the hood here? how do I assign a constant value 
to a dscalar x?


> x = T.dscalar('x')
> type(x)

theano.tensor.var.TensorVariable


Also, if someone knows of a reference that answers these basic questions that 
are not answered in the docs, I would be grateful.


daniel

-- 

--- 
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] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Pascal Lamblin
On Thu, Oct 06, 2016, Rav wrote:
> I'm not sure what you refer to.

I mean the current directory in the file system, as returned for
instance by "os.getcwd()" from Python.

> I just run theano from where ever i want (jupyter, terminal, ide)
> Some tips would be helpful

And do you have the exact same error message in all these cases?
Which version of Theano are you using?
How did you install it?
Can you try to remove the compilation cache (theano-cache purge)?

It is also possible that you have several versions of Theano installed
and that they conflict with each other.

> 
> On Thursday, October 6, 2016 at 9:40:03 PM UTC+2, Pascal Lamblin wrote:
> >
> > What is the current directory where you launched Python? 
> > You should not try to import theano from inside the theano checkout. 
> >
> > On Thu, Oct 06, 2016, Rav wrote: 
> > > import theano 
> > > Traceback (most recent call last): 
> > >   File "", line 1, in  
> > >   File "/Users/BB1/src/theano/theano/__init__.py", line 52, in  
> > > from theano.gof import ( 
> > >   File "/Users/BB1src/theano/theano/gof/__init__.py", line 38, in 
> >  
> > > from theano.gof.cc import \ 
> > >   File "/Users/BB1/src/theano/theano/gof/cc.py", line 28, in  
> > > from theano.gof import graph 
> > > ImportError: cannot import name graph 
> > > 
> > > -- 
> > > 
> > > --- 
> > > 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. 
> >
> >
> > -- 
> > 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.


-- 
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] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Rav
I'm not sure what you refer to.
I just run theano from where ever i want (jupyter, terminal, ide)
Some tips would be helpful

On Thursday, October 6, 2016 at 9:40:03 PM UTC+2, Pascal Lamblin wrote:
>
> What is the current directory where you launched Python? 
> You should not try to import theano from inside the theano checkout. 
>
> On Thu, Oct 06, 2016, Rav wrote: 
> > import theano 
> > Traceback (most recent call last): 
> >   File "", line 1, in  
> >   File "/Users/BB1/src/theano/theano/__init__.py", line 52, in  
> > from theano.gof import ( 
> >   File "/Users/BB1src/theano/theano/gof/__init__.py", line 38, in 
>  
> > from theano.gof.cc import \ 
> >   File "/Users/BB1/src/theano/theano/gof/cc.py", line 28, in  
> > from theano.gof import graph 
> > ImportError: cannot import name graph 
> > 
> > -- 
> > 
> > --- 
> > 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. 
>
>
> -- 
> 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] Error using floatX = float16 to save memory

2016-10-06 Thread Frédéric Bastien
For float16, always use
device=cuda

Not device=gpu. This could be your problem. Can you test that?

thanks

Fred

On Tue, Oct 4, 2016 at 10:21 AM,  wrote:

> Hi Fred,
>  I tested the convnet using
>
>  floatX= float32,
> device=gpu
> theano.tensor.nnet.conv3d2d.conv3d
> updated theano/sandbox/cuda/blas.py  downloaded from
> https://github.com/Theano/Theano/pull/5050
> 
>
> The convnet converges:
>
> Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul  2 2016, 17:42:40)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
> >>> runfile('/home/luca/data/DeepLearningTutorials/Theano-
> 3D-ConvNet-master/convnet3d/core/run_multi_conv_t.py',
> wdir='/home/luca/data/DeepLearningTutorials/Theano-
> 3D-ConvNet-master/convnet3d/core')
> Using gpu device 0: GeForce 840M (CNMeM is disabled, cuDNN 5103)
> /home/luca/data/Theano-master/theano/tensor/signal/downsample.py:6:
> UserWarning: downsample module has been moved to the
> theano.tensor.signal.pool module.
>   "downsample module has been moved to the theano.tensor.signal.pool
> module.")
>
>
> start time:
> 04/10/2016
> 16:18:13
>
>
> Images for training: 316
> Images for validation: 56
>
> training @ iter =  0
> training cost 0.69672
> epoch 1, training batch 316/316, validation error 37.500 %
> --
>
> If I make the same test using:
> floatX = float16
> device=gpu
> theano.tensor.nnet.conv3d2d.conv3d
> updated theano/sandbox/cuda/blas.py  downloaded from
> https://github.com/Theano/Theano/pull/5050
> 
>
> I have an error running the  convnet:
> Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul  2 2016, 17:42:40)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
> >>> runfile('/home/luca/data/DeepLearningTutorials/Theano-
> 3D-ConvNet-master/convnet3d/core/run_multi_conv_t.py',
> wdir='/home/luca/data/DeepLearningTutorials/Theano-
> 3D-ConvNet-master/convnet3d/core')
> Using gpu device 0: GeForce 840M (CNMeM is disabled, cuDNN 5103)
> /home/luca/data/Theano-master/theano/tensor/signal/downsample.py:6:
> UserWarning: downsample module has been moved to the
> theano.tensor.signal.pool module.
>   "downsample module has been moved to the theano.tensor.signal.pool
> module.")
> Disabling C code for Elemwise{mul,no_inplace} due to unsupported float16
> Disabling C code for Elemwise{Cast{float32}} due to unsupported float16
> Disabling C code for Elemwise{Cast{float16}} due to unsupported float16
> Disabling C code for Elemwise{Cast{float16}} due to unsupported float16
> Disabling C code for Alloc due to unsupported float16
> Disabling C code for Elemwise{abs_,no_inplace} due to unsupported float16
> Disabling C code for Sum{acc_dtype=float32} due to unsupported float16
> Disabling C code for mrg_uniform{TensorType(float16, matrix),inplace} due
> to unsupported float16
> Disabling C code for mrg_uniform{TensorType(float16, matrix),inplace} due
> to unsupported float16
> Disabling C code for Elemwise{Composite{(-Cast{float16}((i0 / i1)))}} due
> to unsupported float16
> Disabling C code for Elemwise{Composite{Cast{float16}(Cast{int64}(LT(i0,
> i1)))}}[(0, 0)] due to unsupported float16
> Disabling C code for Elemwise{Composite{Cast{float16}(Cast{int64}(LT(i0,
> i1)))}}[(0, 0)] due to unsupported float16
> Disabling C code for CorrMM{valid, (1, 1), (1, 1)} due to unsupported
> float16
> Disabling C code for DiagonalSubtensor{inplace} due to unsupported float16
> Disabling C code for Sum{axis=[3], acc_dtype=float32} due to unsupported
> float16
> Disabling C code for Elemwise{Add}[(0, 0)] due to unsupported float16
> Disabling C code for sigmoid due to unsupported float16
> Disabling C code for Pool{ds=(3, 3), ignore_border=True, st=(3, 3),
> padding=(0, 0), mode='max'} due to unsupported float16
> Disabling C code for Pool{ds=(1, 3), ignore_border=True, st=(1, 3),
> padding=(0, 0), mode='max'} due to unsupported float16
> Disabling C code for dot due to unsupported float16
> Disabling C code for Elemwise{Composite{scalar_sigmoid((i0 + i1))}}[(0,
> 0)] due to unsupported float16
> Disabling C code for Elemwise{mul,no_inplace} due to unsupported float16
> Disabling C code for dot due to unsupported float16
> Disabling C code for CrossentropySoftmaxArgmax1HotWithBias due to
> unsupported float16
> Disabling C code for CrossentropySoftmax1HotWithBiasDx due to unsupported
> float16
> Disabling C code for 

Re: [theano-users] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Pascal Lamblin
What is the current directory where you launched Python?
You should not try to import theano from inside the theano checkout.

On Thu, Oct 06, 2016, Rav wrote:
> import theano
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/Users/BB1/src/theano/theano/__init__.py", line 52, in 
> from theano.gof import (
>   File "/Users/BB1src/theano/theano/gof/__init__.py", line 38, in 
> from theano.gof.cc import \
>   File "/Users/BB1/src/theano/theano/gof/cc.py", line 28, in 
> from theano.gof import graph
> ImportError: cannot import name graph
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Rav
import theano
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/BB1/src/theano/theano/__init__.py", line 52, in 
from theano.gof import (
  File "/Users/BB1src/theano/theano/gof/__init__.py", line 38, in 
from theano.gof.cc import \
  File "/Users/BB1/src/theano/theano/gof/cc.py", line 28, in 
from theano.gof import graph
ImportError: cannot import name graph

-- 

--- 
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] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Pascal Lamblin
Please provide the full error message.

On Thu, Oct 06, 2016, Rav wrote:
> My theano environment worked fine for months, suddenly i keep getting an 
> error when i load related packages. 
> When i import theano in the ide, notebook or shell, i get
> 
> import theano
> ImportError: cannot import name graph
> 
> Or i get 
> "No module named cPickle" 
> 
> The packages cPickle or graph (six) do seem to be a symptom of a deeper 
> problem. 
> Can anyone give a solution?
> 
> mac osx 10
> python 2.7
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] batched_dot for 2D times 3D

2016-10-06 Thread Pascal Lamblin
You do not need batched_dot for that operation, try tensordot instead.

On Thu, Oct 06, 2016, luke wrote:
> Hello all,
> 
> I am trying to accomplish the following multiplication: Y = batched_dot(X, 
> W)
> where X is of shape [b,f] and W is of shape [k,f,h], so that Y is of shape 
> [k,b,h].
> 
> So basically the matrix multiplication of X * W, iterated over the 
> dimension k.
> I know that batched_dot would work here if X was also 3D with a leading 
> dimension k, but i couldn't get it working so far.
> 
> 
> any ideas?
> 
> Luke
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] loading very larg image dataset in HDF format on the fly

2016-10-06 Thread Pascal Lamblin
Then you can simply have a look at what Fuel is doing to handle its hdf5
files, and try to replicate that in your own loading code.

On Thu, Oct 06, 2016, H wrote:
> The problem with Fuel is I already have my hdf5 file because it's too big I 
> created it by separating data to chunks and it takes several days to be 
> created.. I've tried to use Fuel to load my hdf5 file but it's not 
> possible. 
> 
> On Tuesday, October 4, 2016 at 2:46:34 PM UTC+2, nouiz wrote:
> >
> > I mean the fuel package is for dataset handling. Check it documentation 
> > for how to use it. It hello in particular for but dataset.
> >
> > Le 4 oct. 2016 04:22, "H" > a écrit :
> >
> >> Would you please explain it more. You mean Fuel package helps to load 
> >> large dataset to the network?
> >>
> >> -- 
> >>
> >> --- 
> >> 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.
> >>
> >
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] UserWarning: downsample module has been moved to the pool module

2016-10-06 Thread Pascal Lamblin
On Thu, Oct 06, 2016, Beatriz G. wrote:
> I can not use  downsamaple.max_pool_2d, how it is called now? 
> theano.tensor.signal.pool.pool_2d () or theano.tensor.signal.pool.
> max_pool_2d_same_size()

The equivalent is pool_2d(..., mode='max').

max_pool_2d_same_size is used when you want to zero out the elements
that are not the local max, and keep a tensor that has the same size.


> 
> regards. 
> 
> El martes, 1 de marzo de 2016, 3:02:48 (UTC+1), Michael Klachko escribió:
> >
> > To answer my own question, the new code for average pooling is about 4 
> > times faster. 
> >
> >
> >
> > On Friday, February 26, 2016 at 2:05:10 PM UTC-8, Michael Klachko wrote:
> >>
> >> Thanks! Actually, it's theano.tensor.signal.pool. 
> >> Previously, to implement averaging pooling operation, I used the 
> >> following code:
> >>
> >> pooled_out = TSN.images2neibs(ten4=conv_out, neib_shape=
> >> poolsize, mode='ignore_borders').mean(axis=-1)
> >> new_shape = T.cast(T.join(0, conv_out.shape[:-2],
> >>T.as_tensor([conv_out.shape[2
> >> ]/poolsize[0]]),
> >>T.as_tensor([conv_out.shape[3
> >> ]/poolsize[1]])), 'int64')
> >> pooled_out = T.reshape(pooled_out, new_shape, ndim=4) 
> >>
> >> Where TSN is theano.sandbox.neighbours. I wonder if there's any speed 
> >> advantage to replace this code with:
> >>
> >> pooled_out = pool.pool_2d(conv_out, ds=poolsize, ignore_border=True, 
> >> st=None, padding=(0,0), mode=pooltype)
> >>
> >>
> >>
> >> On Friday, February 26, 2016 at 6:06:12 AM UTC-8, nouiz wrote:
> >>>
> >>> theano.tensor.nnet.pool
> >>>
> >>> Fred
> >>>
> >>> On Thu, Feb 25, 2016 at 7:56 PM, Michael Klachko  
> >>> wrote:
> >>>
>  I'm running the latest dev version, where do I find this new 'pool' 
>  module?
> 
>  -- 
> 
>  --- 
>  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.
> 
> >>>
> >>>
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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] problwm with using multi cores and GPU at the same time

2016-10-06 Thread Pascal Lamblin
It may simply be that the Theano computation that would use multiple
cores are being moved to the GPU, and not using the CPU cores any more.

On Thu, Oct 06, 2016, 蒋楠 wrote:
> Hi everyone, I am using theano, but have some problems with using multi 
> cores and GPU at the same time.
> 
> The platform is Ubuntu 14.04, numpy compiled with MKL for blas. I have 
> checked that theano supports multi cores, following the instruction at 
> here: here 
> 
> 
> When i run my program, with OMP_NUM_THREADS=8 
> THEANO_FLAGS=device=cpu,floatX=float32 python train.py, it uses multiple 
> cores successfully. However, if I run OMP_NUM_THREADS=8 
> THEANO_FLAGS=device=gpu,floatX=float32 python train.py, it only use one 
> core each time. In my program, I use both theano and numpy heavily, so i 
> hope to use gpu for deep learning and multiple cores for some numpy 
> computation.
> 
> Anyone could help me? Any reply would be highly appreciated.
> 
> -- 
> 
> --- 
> 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

-- 

--- 
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.


[theano-users] Unsolvable Theano import error "No module named cPickle" and "No module named graph"

2016-10-06 Thread Rav
My theano environment worked fine for months, suddenly i keep getting an 
error when i load related packages. 
When i import theano in the ide, notebook or shell, i get

import theano
ImportError: cannot import name graph

Or i get 
"No module named cPickle" 

The packages cPickle or graph (six) do seem to be a symptom of a deeper 
problem. 
Can anyone give a solution?

mac osx 10
python 2.7

-- 

--- 
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.


[theano-users] batched_dot for 2D times 3D

2016-10-06 Thread luke
Hello all,

I am trying to accomplish the following multiplication: Y = batched_dot(X, 
W)
where X is of shape [b,f] and W is of shape [k,f,h], so that Y is of shape 
[k,b,h].

So basically the matrix multiplication of X * W, iterated over the 
dimension k.
I know that batched_dot would work here if X was also 3D with a leading 
dimension k, but i couldn't get it working so far.


any ideas?

Luke

-- 

--- 
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.


[theano-users] Re: Setting PATH for any python IDE for theano (on windows)

2016-10-06 Thread Martin Holeček
Oki,

answering myself for future references for other googleers - PyCharm 
Community edition works like expected with theano and environment variables 
being set by .bat script :)


-- 

--- 
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] loading very larg image dataset in HDF format on the fly

2016-10-06 Thread H
The problem with Fuel is I already have my hdf5 file because it's too big I 
created it by separating data to chunks and it takes several days to be 
created.. I've tried to use Fuel to load my hdf5 file but it's not 
possible. 

On Tuesday, October 4, 2016 at 2:46:34 PM UTC+2, nouiz wrote:
>
> I mean the fuel package is for dataset handling. Check it documentation 
> for how to use it. It hello in particular for but dataset.
>
> Le 4 oct. 2016 04:22, "H" > a écrit :
>
>> Would you please explain it more. You mean Fuel package helps to load 
>> large dataset to the network?
>>
>> -- 
>>
>> --- 
>> 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.
>>
>

-- 

--- 
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] UserWarning: downsample module has been moved to the pool module

2016-10-06 Thread Beatriz G.
I can not use  downsamaple.max_pool_2d, how it is called now? 
theano.tensor.signal.pool.pool_2d () or theano.tensor.signal.pool.
max_pool_2d_same_size()

regards. 

El martes, 1 de marzo de 2016, 3:02:48 (UTC+1), Michael Klachko escribió:
>
> To answer my own question, the new code for average pooling is about 4 
> times faster. 
>
>
>
> On Friday, February 26, 2016 at 2:05:10 PM UTC-8, Michael Klachko wrote:
>>
>> Thanks! Actually, it's theano.tensor.signal.pool. 
>> Previously, to implement averaging pooling operation, I used the 
>> following code:
>>
>> pooled_out = TSN.images2neibs(ten4=conv_out, neib_shape=
>> poolsize, mode='ignore_borders').mean(axis=-1)
>> new_shape = T.cast(T.join(0, conv_out.shape[:-2],
>>T.as_tensor([conv_out.shape[2
>> ]/poolsize[0]]),
>>T.as_tensor([conv_out.shape[3
>> ]/poolsize[1]])), 'int64')
>> pooled_out = T.reshape(pooled_out, new_shape, ndim=4) 
>>
>> Where TSN is theano.sandbox.neighbours. I wonder if there's any speed 
>> advantage to replace this code with:
>>
>> pooled_out = pool.pool_2d(conv_out, ds=poolsize, ignore_border=True, 
>> st=None, padding=(0,0), mode=pooltype)
>>
>>
>>
>> On Friday, February 26, 2016 at 6:06:12 AM UTC-8, nouiz wrote:
>>>
>>> theano.tensor.nnet.pool
>>>
>>> Fred
>>>
>>> On Thu, Feb 25, 2016 at 7:56 PM, Michael Klachko  
>>> wrote:
>>>
 I'm running the latest dev version, where do I find this new 'pool' 
 module?

 -- 

 --- 
 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.

>>>
>>>

-- 

--- 
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.


[theano-users] problwm with using multi cores and GPU at the same time

2016-10-06 Thread 蒋楠
Hi everyone, I am using theano, but have some problems with using multi 
cores and GPU at the same time.

The platform is Ubuntu 14.04, numpy compiled with MKL for blas. I have 
checked that theano supports multi cores, following the instruction at 
here: here 


When i run my program, with OMP_NUM_THREADS=8 
THEANO_FLAGS=device=cpu,floatX=float32 python train.py, it uses multiple 
cores successfully. However, if I run OMP_NUM_THREADS=8 
THEANO_FLAGS=device=gpu,floatX=float32 python train.py, it only use one 
core each time. In my program, I use both theano and numpy heavily, so i 
hope to use gpu for deep learning and multiple cores for some numpy 
computation.

Anyone could help me? Any reply would be highly appreciated.

-- 

--- 
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] BN in a fully convolutional network

2016-10-06 Thread Aloïs
Hi guys,

I think I fixed the bug in keras. Here is the corresponding pull request 
: https://github.com/fchollet/keras/pull/3968

Best,
Aloïs

Le mercredi 5 octobre 2016 23:47:00 UTC+2, Pascal Lamblin a écrit :
>
> On Wed, Oct 05, 2016, Daπid wrote: 
> > On 5 October 2016 at 21:01, Pascal Lamblin  > wrote: 
> > > Just a hunch: is it possible that the "axis=2" parameter of 
> > > BatchNormalization has to be changed between TF an Theano, since they 
> > > may not use the same memory layout for convolutions? 
> > 
> > I don't think so, the layout is fixed between backends, and I am sure 
> > it is correct because the number of parameters is what I would expect. 
> > Using axis=1 throws an error in Keras (before ever dispatching the 
> > backend), since its dimension is None. 
>
> Then, I don't know. It may be an issue in the gradient of some operation 
> in Theano. Can you try with test values and pdb, to try to pinpoint 
> which gradient operation inserts the tensor with a wrong size? 
>
> > 
> > -- 
> > 
> > --- 
> > 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. 
>
> -- 
> 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] Warning: Failed to import scipy.linalg.blas (DLL load failed)

2016-10-06 Thread Beatriz G.
I have tried that and I does not work, to make theano work in a different 
folder where it is installed I had to add a enviroment variable (I do not 
know if it is called in tha way in english) but I have to add a pythopath 
with the theano folder. 
El miércoles, 4 de febrero de 2015, 11:42:01 (UTC+1), matteo hessel 
escribió:
>
> Thanks, that worked
>
> Il giorno lunedì 2 febbraio 2015 17:06:59 UTC, Pascal Lamblin ha scritto:
>>
>> Hi, 
>>
>> Apparently, Theano is trying to access the bindings for BLAS through 
>> scipy, and the configuration variable "blas.ldflags" is empty, which 
>> means Theano was not able to access BLAS directly. 
>>
>> I'm not sure what is needed exactly, but you may need to add the 
>> location of the blass DLL to the %PATH% environment variable, and to 
>> manually specify the blas.ldflags configuration flag for theano, for 
>> instance create a .theanorc.txt file in your home directory, with 
>> content that looks like: 
>>
>> [blas] 
>> ldflags = -LX:\\YYY\\YYY -lopenblas 
>>
>> where X:\\YYY\\YYY is the path containing libopenblas.dll 
>>
>> On Sun, Feb 01, 2015, matteo hessel wrote: 
>> > I installed theano on Windows and everything is working fine, 
>> > However, the implementation of the dot product between matrix and 
>> vector 
>> > and between vectors is slow because the openblas DLL doesn't load 
>> > (I attach the warning below) 
>> > 
>> > I downloaded the binaries for Windows from http://www.openblas.net/ 
>> > 
>> > however where do I need to position the DLL or how do I need to 
>> configure 
>> > theano in order for it to see it? 
>> > 
>> > - 
>> > C:\Users\User>python 
>> > Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit 
>> (Intel)] 
>> > on win32 
>> > Type "help", "copyright", "credits" or "license" for more information. 
>> > >>> import theano 
>> > WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas, and 
>> > Theano fla 
>> > g blas.ldflags is empty. Falling back on slower implementations for 
>> > dot(matrix, 
>> > vector), dot(vector, matrix) and dot(vector, vector) (DLL load failed: 
>> > Impossibi 
>> > le to find specified module. 
>> > -- 
>> > 
>> > -- 
>> > 
>> > --- 
>> > 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. 
>>
>>
>> -- 
>> 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.


[theano-users] Re: Problem with blas and downsample module

2016-10-06 Thread Beatriz G.
Also, I have Anaconda and Winpython installed, I have installed winpython 
like in the deeplearning tutorial and Anaconda is installed in users 
(Windows).

El jueves, 6 de octubre de 2016, 10:41:00 (UTC+2), Beatriz G. escribió:
>
> Hi eveyone, I have just installed theano in my computer in windows and I 
> am able to import theano, but when I have tried to import downsample module 
> and I have gotten the following warning and error:
>
> WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas, and 
> Theano flag blas.ldflags is empty. Falling back on slower implementations 
> for dot(matrix, vector), dot(vector, matrix) and dot(vector, vector) (No 
> module named scipy.linalg.blas)
> Traceback (most recent call last):
>   File "C:/Users/FRAV/Desktop/Beatriz/CASIA_VDEO_LENET/casia_Lenet.py", 
> line 10, in 
> from theano.tensor.signal import downsample
> ImportError: cannot import name downsample
>
> Process finished with exit code 1
>
>
> Anyone could help me? 
>
> The code in my ubuntu laptop works fine.
>

-- 

--- 
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.


[theano-users] Problem with blas and downsample module

2016-10-06 Thread Beatriz G.
Hi eveyone, I have just installed theano in my computer in windows and I am 
able to import theano, but when I have tried to import downsample module 
and I have gotten the following warning and error:

WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas, and 
Theano flag blas.ldflags is empty. Falling back on slower implementations 
for dot(matrix, vector), dot(vector, matrix) and dot(vector, vector) (No 
module named scipy.linalg.blas)
Traceback (most recent call last):
  File "C:/Users/FRAV/Desktop/Beatriz/CASIA_VDEO_LENET/casia_Lenet.py", 
line 10, in 
from theano.tensor.signal import downsample
ImportError: cannot import name downsample

Process finished with exit code 1


Anyone could help me? 

The code in my ubuntu laptop works fine.

-- 

--- 
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.