In keras documentation, input tensor for dense layer takes the input as:
Input shape
nD tensor with shape:
(batch_size, ..., input_dim)
. The most common situation would be a 2D input with shape(batch_size, input_dim)
.
To my understanding, batch size in input tensor is the amount of examples you give for training or predicting.
For the batch_size
in model.fit
,
batch_size: Integer or
None
. Number of samples per gradient update. If unspecified,batch_size
will default to 32.
So are the 2 batch size doing the same thing, reducing the input data so as to prevent memory from filling up completely?
Also, I understand that the batch_size
in input shape is optional, as keras puts a None
if not specified. Is specifying batch_size
necessary in model.fit
?