This repository was archived by the owner on Jul 10, 2021. It is now read-only.

Description
Hi,
I'm trying out your (lovely) package on non image data, and would like to try using convolutions - I see that currently only 2D convolutions are supported, any chance of adding in 1D support/for non image/square data?
(i.e As my first layer I tried:
Convolution("Rectifier", channels=32, kernel_shape=(1,1))
)
'AssertionError: Input array is not in image shape, and could not assume a square.'
Thanks!
Activity
alexjc commentedon Jun 28, 2015
1D convolutions work already, there's a test for it. The problem here is that you want to apply the convolution over a 2D image but you're giving the NN a 1D array, and it can't figure out what size you mean. (It tries to guess square, but your data is not square.)
Try reshaping your inputs?
EDIT: In case you want to convolve over a 1D image, you still need to specify either
(N, 1)or(1, N)as an array size—just like the kernel you have is 2D.ddofer commentedon Jun 28, 2015
I am using a 1d array of features.. ;
So, The solution is to reshape the features (X) into a square? Ok, thanks.
On Jun 28, 2015 2:33 PM, "Alex J. Champandard" notifications@github.com
wrote:
alexjc commentedon Jun 28, 2015
If you have a
(1,1)kernel you can use any input shape as long as it's 2D!ddofer commentedon Jul 17, 2015
By "N", do you mean a string input, or an integer with a preset size?
alexjc commentedon Jul 18, 2015
I mean an integer with preset size that matches your data.
elenacuoco commentedon Aug 11, 2015
Hi,
I have the same request. Your package is really useful. I did not understand how to use conv1D in your package. I'm looking for something like Conv1D in Lasagne (http://lasagne.readthedocs.org/en/latest/modules/layers/conv.html),without reshaping the data...
alexjc commentedon Aug 12, 2015
I will have to look at this and add a test or two. Thanks for the feedback!
alexjc commentedon Nov 20, 2015
We use Lasagne now, I'd consider adding this if there's enough interest!