fchollet / deep-learning-with-python-notebooks

Jupyter notebooks for the code samples of the book "Deep Learning with Python"
MIT License
18.17k stars 8.53k forks source link

3.1.1 batch dimension is unspecified #102

Open MbProg opened 5 years ago

MbProg commented 5 years ago

Hello, in the book in 3.1.1 it states:

Consider the following example:

from keras import layers
layer = layers.Dense(32, input_shape=(784,))

We’re creating a layer that will only accept as input 2D tensors where the first dimension is 784 (axis 0, the batch dimension, is unspecified, and thus any value would be accepted).

Here it says that axis 0 is unspecified. I don't understand that. Isn't axis 0 specified by 784? 784 is the size of axis 0. So, why it says that it is unspecified? And why it says that any value would be accepted? Hasn't it to be of shape (784,) to be accepted?

RorisangSitoboli commented 5 years ago

Definitely axis 0 is specified. It should be (axis 1, the batch dimension, is unspecified...)