In the function “model_forecast()” we don’t create tuples with features and labels like we did in the function “windowed_dataset()”. Why?
# Create tuples with features and labels
dataset = dataset.map(lambda window: (window[:-1], window[-1]))
In the function “model_forecast()” we don’t create tuples with features and labels like we did in the function “windowed_dataset()”. Why?
# Create tuples with features and labels
dataset = dataset.map(lambda window: (window[:-1], window[-1]))
The function model_forecast
is used to prepare input to the model to make the prediction. So, there’s no outputs here. On the other hand, function windowed_dataset
is used to prepare (inputs, outputs) pairs for training the model.
Thanks, Balaji! I see now that the function model_forecast() is calling the “model” , which means that we are using the weights that had already been trained in the previous steps.