Hacker News new | ask | show | jobs
by Florin_Andrei 3191 days ago
Well, what happens if you build a 1D-input CNN in TensorFlow and train it the usual way? Does it work? Seems like it should.

What's even the difference between 1D inputs and 2D inputs? It's all a bunch of numbers anyway. I don't think it really matters if the pixels are arranged (as you see them) in a neat rectangle vs in a straight line. You could take a 2D matrix and enumerate it as a linear string of numbers and it would still be the same matrix, just represented differently. I don't think the CNN cares either way.

I would go as far as saying that the 1D-ness of the input is just "in your head".

1 comments

I would argue that in a signal (1D) you can expect some sort of relationship between consecutive elements. In an image (in essence a 2D signal), you can expect a relationship between consecutive elements not just on the horizontal, but also on the vertical axis.

If you arbitrarily represent a signal as a 2D matrix, then abrupt changes in the gradient on the vertical axis are meaningless. But the same is not true in an image, which is naturally represented as a 2D matrix. Here, a sudden change on the vertical axis usually corresponds to an edge in the image.

If you represent an image as a 1D array, you throw away spatial information. So I'm not sure about the 1D-ness just being in ones head.