input shape (ML)
On the first layer of a network, you need to define the inputShape
. The inputShape
is [1]
when there is 1
number as the input.
Python Example
For this data:
X: | -1 | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|---|
Y: | -2 | 1 | 4 | 7 | 10 | 13 |
The input shape is [1]
. I don’t really understand why.
JavaScript Example
But shouldn’t the input shape of the Python example then be [6, 1]
?