0
$\begingroup$

I have a 1D signal data sampled at 25kHz and I want to modify in to 2D signal so as to modify it as the input to ConvolutionalNets as they work only on 2 dimensional data. What are possible ways to convert the signal from 1D to 2D for such calculations. I have seen some papers but I couldnt find any relevant understanding how the conversion of signal is modified as to apply to CNN operations. For example if I have 25 data samples in the input and if i rearrange in to a 2d signal as 5X5 sized(inbuilt function in matlab: "reshape").If I am applying 3x3 filter for convolution operation, smallest filter and the output of that 5x5 size input will be 3x3 size. Can I apply such input to any convnets? Is that a valid type of conversion to apply for CNN ? In such kind of inputs I understand there will be relation in row wise but not column wise.
Any explanation or suggestion would be helpful.

Updated for the comment

I want to convert 1d signal in to 2d image signal. In an image a pixel will have relation with the adjacent 8 pixels. If I am rearranging a 1D signal to 2D signal as quoted in the example , the row 1 will have 5 data samples and next row starts with 6th sample and so on. If I take a sample in row 2, 2nd sample, I have relation first and third sample in the same row but nothing with samples from row 1 and row 3. So If Im converting such way is that appropriate ? In the paper mentioned ( Fig 1) I wanted to know how the 1D signal is converted and applied to CNN link

$\endgroup$
  • $\begingroup$ Can I please ask you to clarify what exactly the question is? What is the application? The "conversion" is a bit more involved than reshape. You are most likely looking for the spectrogram but then again, maybe not (?). Even if you are looking for the spectrogram, the details of the application will determine its parameters. Are you following the workflow presented in a paper? Would it be possible to cite it? $\endgroup$ – A_A Feb 12 '17 at 13:00
  • $\begingroup$ link updated as its lengthy for comment $\endgroup$ – Raady Feb 12 '17 at 13:17
3
$\begingroup$

There are a couple things with that question.

1) Why do you need 2D convolutions exactly? You could think of a 1D signal as an $Nx1$ 2d signal if you like ;) Then you can design your convolutional filters to be $7x1$, $5x1$, $3x1$ etc. The pooling you only apply in the x-direction. And there you go. It's a 2D convolutional neural network, which works on 1D signal. Just kidding, it just a CNN.

2) Simple fully-connected deep learning neural networks are better for handling 1D data, as far as I know. Of course it's best if your data is evenly sampled. CNN comes handy when the fully connected structure explodes the computation. In your case, that should not be a big issue.

If your 1d data vector is too large, just try subsampling, instead of a convolutional architecture.

3) Converting a 1d data to 2d is probably valid only if you know in advance that this 1d manifold carries non-uniform neighborhood information, which could be represented with a 2D matrix with nearby connections. The paper probably inserts a layer to the network which re-arranges the indices into a 32x32 matrix. The weights or the indices where to put each value maybe learnt by the network itself. You would need to write the backprop for this though.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.