why my batch size doesn't change it happens quite a lot for me that I declared batch_size=64 or any number and end up watching Keras training my net on whole data instead of the batch. then I edit it many times and finally finished with the very first code working.
for example this simple code:
data_train=pd.read_csv(&quot;train.csv&quot;)
y=data_train[&quot;label&quot;]
dt=data_train.drop(&quot;label&quot;, axis=1)
inputs = keras.Input(shape=(784,), name=&quot;digits&quot;)
x = layers.Dense(500, activation=&quot;relu&quot;, name=&quot;dense_1&quot;)(inputs)
x = layers.Dense(500, activation=&quot;relu&quot;, name=&quot;dense_2&quot;)(x)
x = layers.Dense(300, activation=&quot;relu&quot;, name=&quot;dense_3&quot;)(x)
x = layers.Dense(64, activation=&quot;relu&quot;, name=&quot;dense_4&quot;)(x)
outputs = layers.Dense(10, activation=&quot;softmax&quot;, name=&quot;predictions&quot;)(x)

model = keras.Model(inputs=inputs, outputs=outputs)
opt = keras.optimizers.Adam(learning_rate=0.01)
model.compile(optimizer=opt, loss=&quot;sparse_categorical_crossentropy&quot;, metrics=[&quot;accuracy&quot;])
X_train, X_test, y_train, y_test = train_test_split(dt, y, test_size=0.2)
X_train, Xvalid, y_train, yvalid = train_test_split(X_train, y_train, test_size=0.2)
history=model.fit(X_train,y_train, batch_size=64 ,epochs=30,validation_data=(Xvalid,yvalid))

and it train itself with :
26880/26880 [==============================] - 3s 108us/sample - loss: 0.4717 - acc: 0.8718 - val_loss: 0.4149 - val_acc: 0.8847
how I can fix it?
Thanks
Using model.fit() will always train on the whole dataset for n epochs. The batch_size argument denotes how many samples are used to calculate the gradient and updates the parameters. If you want to train the model on just a batch of data (i.e. a subset of your total dataset) simply pass the subset of data to model.fit().