[SciPy-Dev] scipy improve performance by parallelizing

Sai Rajeshwar rajsai24 at gmail.com
Sat Jul 19 13:32:31 EDT 2014


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 at nouiz.org> wrote:

>
>
>
> On Mon, Jul 14, 2014 at 10:53 AM, Sai Rajeshwar <rajsai24 at 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
>> <http://deeplearning.net/software/theano/library/tensor/signal/conv.html#theano.tensor.signal.conv.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140719/c8bc3331/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lenet_kth_my.py
Type: text/x-python
Size: 11700 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140719/c8bc3331/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logistic_sgd1.py
Type: text/x-python
Size: 15103 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20140719/c8bc3331/attachment-0001.py>


More information about the SciPy-Dev mailing list