# 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("train.csv")
y=data_train["label"]
dt=data_train.drop("label", axis=1)
inputs = keras.Input(shape=(784,), name="digits")
x = layers.Dense(500, activation="relu", name="dense_1")(inputs)
x = layers.Dense(500, activation="relu", name="dense_2")(x)
x = layers.Dense(300, activation="relu", name="dense_3")(x)
x = layers.Dense(64, activation="relu", name="dense_4")(x)
outputs = layers.Dense(10, activation="softmax", name="predictions")(x)

model = keras.Model(inputs=inputs, outputs=outputs)

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().