hi Frederic..

 following your advice i tried to rewrite my code.. using theano conv3d.
basically im implementing a convolutional neural network..  and the problem with my code using theano is.. that error percenage across epochs doesnot decrease.  i dont know if the problem with my implementation of conv3d..  i attach my code here..  
thanks a lot in advance..

with regards..

M. Sai Rajeswar
M-tech  Computer Technology
IIT Delhi
----------------------------------Cogito Ergo Sum---------


On Mon, Jul 14, 2014 at 8:33 PM, Frédéric Bastien <nouiz@nouiz.org> wrote:



On Mon, Jul 14, 2014 at 10:53 AM, Sai Rajeshwar <rajsai24@gmail.com> wrote:
hi frederic,

thanks, actually im trying to implement a 3d-convolutional neural network as you can see in the snippet..  so you mean to say

1)instead of using scipy.signal.convolve  i should import theano and use signal.conv2d ,  if so signal.conv2d is right or any other function according to my need.. 

We have some special conv3d for neural network: http://deeplearning.net/software/theano/library/tensor/nnet/conv.html. Maybe the suite better what you want. But to be useful, you will need medium/big convolution, not tini video.
 

2)also any hints on speeding up numpy.sum in

   pooled[0][i][j][k][l]=math.
tanh((numpy.sum(conv_out[0][i][j][k*3][l*3:(l+1)*3])+numpy.sum(conv_out[0][i][j][k*3+1][l*3:(l+1)*3])+numpy.sum(conv_out[0][i][j][k*3+2][l*3:(l+1)*3]))/9.0+b[i][j])

Someone else reply with some information to do less indexing and do the sum on bigger chunk of data each time. This could speed up your stuff.
 
thanks a lot..   also i have seen your name some where in pylearn2.. are ua pylearn developer too.

Yes and no. I'm in the same lab as the main Pylearn2 dev and I do some small contribution from time to time(stuff mostly related to optimizaiton or Theano). But I wouldn't call me a pylearn2 core dev.

Fred