0

I'm trying to use generator as the input for model predict function,

prediction = model.predict(generator)

I created my generator in this way

generator = tf.keras.preprocessing.sequence.TimeseriesGenerator(x_feature,y_target, length=n_input,batch_size = 1024)

My question are:

1.Is this a correct way of creating generator for predict function ?

2.If it is, why it takes target value as input, if it's not, what kind of generator is expected here?

I'm using generator since my dataset does not fit my memory, as suggested here, but this question does not show how to create a generator.

Thank you!

whtitefall
  • 631
  • 9
  • 16
  • your question is pretty vague. Try it with a simple example, see what error you get, and then post. – MaMaG Mar 12 '20 at 03:18
  • @MaMaG Hi, sorry for the confusion, I edited my questipon, my question is just asking how to create a generator for predict function. – whtitefall Mar 12 '20 at 03:30

0 Answers0