В случае многоэтапного предсказания, как использовать keras TimeseriesGenerator, чтобы получить итератор для future_length> 1?
Например, в этом случае итератор примет формы x и y как (1 , 10, 2), (1, 1). Я хочу получить (1, 10, 2), (2, 1), возможно ли это?
import numpy as np
from tensorflow.keras.preprocessing.sequence import TimeseriesGenerator
arr = np.linspace(1,150,150).reshape(50,3)
features = arr[:,:-1]
targets = arr[:,-1:]
length = 10 # history_size
batch_size = 1
sampling_rate = 1
data_gen = TimeseriesGenerator(features, targets,
length=length, sampling_rate=sampling_rate,
shuffle=False,
batch_size=batch_size)
x,y = data_gen[0]
x.shape , y.shape