Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a 1D convolution in theano

The only function I can find is for 2D convolutions described here...

Is there any optimised 1D function ?

like image 866
Alexander McFarlane Avatar asked May 14 '15 20:05

Alexander McFarlane


1 Answers

It looks as though this is in development. I've realised I can use the conv2d() function by specifying either width or height as 1...

For the function conv2d(), the parameter image_shape takes a list of length 4 containing:

([number_images,] height, width)

by setting height=1 or width=1 it forces it to a 1D convolution.

like image 183
Alexander McFarlane Avatar answered Sep 22 '22 10:09

Alexander McFarlane