Time Series Fundamentals: Exercise 4 #566
Unanswered
maksytka03
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all. I have a problem with exercise 4, chapter 10. I've sort of figured out how to make a dataset, but don't seem to understand what the
sequence_length
attribute does in thetf.keras.utils.timeseries_dataset_from_array
function.My way of doing things:
train_dataset = tf.keras.utils.timeseries_dataset_from_array(train_windows, targets=train_labels, sequence_length=WINDOW_SIZE) test_dataset = tf.keras.utils.timeseries_dataset_from_array(test_windows, targets=test_labels, sequence_length=WINDOW_SIZE)
Creates two datasets, which I train
model_1
on.After that, I try to get the results of the model using the
evaluate_preds
function we've made in the course.The code errors out, so I figured I can try to use the following code to make it possible to use the
evaluate_preds
function:But I get the following error:
ValueError: Layer "model_1_dense_dataset" expects 1 input(s), but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(32, 7, 7) dtype=float64>, <tf.Tensor 'IteratorGetNext:1' shape=(32, 1) dtype=float64>]
Any help on how to do the exercise properly will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions