I have seen some posts talking about training Keras model on one-by-one sample. I understood from these posts too that Keras model will update the model weights even on one-by-one training basis. So, the question now, in such a case, how we can provide validation split and how we can plot the validation of the model given we are not providing the entire dataset to our model, but row by row of the dataset?
reduce_lr = tf.keras.callbacks.LearningRateScheduler(lambda x: 1e-3 * 0.90 ** x)
model.compile(optimizer=keras.optimizers.Adam(clipnorm=1.0, clipvalue=0.5), loss="mse")
for i in range(train_size):
one_row = train_data.iloc[i:i+1, :].to_numpy()
one_row = tf.convert_to_tensor(one_row .reshape(-1, one_row .shape[0], one_row.shape[1]), np.float32)
one_label=one_row
history= model.fit(one_row ,one_label, epochs=10, validation_split=0.1,verbose=2, callbacks=[reduce_lr])