On Tue, Jul 15, 2014 at 12: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.. 

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])


Is it actually the individual sums that are slow, or the whole loop? Its a bit hard to read, but it looks like you could vectorise the addition and then sum? Not sure if that would help much but worth a go maybe?
 
thanks a lot..   also i have seen your name some where in pylearn2.. are ua pylearn developer too.


with regards..

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


On Thu, Jul 10, 2014 at 6:30 PM, Frédéric Bastien <nouiz@nouiz.org> wrote:
Specific about convolution, there is a faster implementation in Theano:

http://deeplearning.net/software/theano/library/tensor/nnet/conv.html

It allow you to do multiple convolution at the same time.

There is a parallel implementation, but sometimes, it speed things up, but othertimes, it slow things down.

Fred

p.s. I'm a Theano developer.

On Thu, Jul 10, 2014 at 6:08 AM, Sai Rajeshwar <rajsai24@gmail.com> wrote:
hi all,

   im trying to optimise a python code takes huge amount of time on scipy functions such as scipy.signa.conv. Following are some of my queries regarding the same.. It would be great to hear from you..  thanks..
----------------------------------------------------
  1) Can Scipy take advantage of multi-cores.. if so how
2)what are ways we can improve the performance of scipy/numpy functions eg: using openmp, mpi etc
3)If scipy internally use blas/mkl libraries can we enable parallelism through these?


looks like i have to work on internals of scipy.. thanks a lot..


with regards..

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

_______________________________________________
SciPy-Dev mailing list
SciPy-Dev@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev



_______________________________________________
SciPy-Dev mailing list
SciPy-Dev@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev



_______________________________________________
SciPy-Dev mailing list
SciPy-Dev@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev