I came across these two pages - page 1 and page 2 which use LSTM for forecasting.
the second link uses below code:
batch_size = 256 buffer_size = 150 train_data = tf.data.Dataset.from_tensor_slices((x_train, y_train)) train_data = train_data.cache().shuffle(buffer_size).batch(batch_size).repeat() val_data = tf.data.Dataset.from_tensor_slices((x_vali, y_vali)) val_data = val_data.batch(batch_size).repeat()
while the first link doesn’t use similar code at all. I have relatively small dataset.
Please guide me regarding when I should use above code and when I shouldn’t. I saw stackoverflow posts regarding
shuffle but I am not clear. Please keep in mind I am building a forecasting model