```
train=pd.read_csv('/kaggle/input/stock-time-series-20050101-to-20171231/IBM_2006-01-01_to_2018-01-01.csv')
close_prices = train['Close']
values = close_prices.values
training_data_len = math.ceil(len(values)* 0.8)
scaler = MinMaxScaler(feature_range=(0,1))
scaled_data = scaler.fit_transform(values.reshape(-1,1))
train_data = scaled_data[0: training_data_len, :]
x_train = []
y_train = []
for i in range(60, len(train_data)):
x_train.append(train_data[i-60:i, 0])
y_train.append(train_data[i, 0])
x_train, y_train = np.array(x_train), np.array(y_train)
x_train = np.reshape(x_train, (x_train.shape[0], x_train.shape[1], 1))
generator=TimeseriesGenerator(x_train,x_train,
length=x_train.shape[1])
model = Sequential()
model.add(LSTM(200,activation='relu',recurrent_dropout=0.1,
return_sequences=True,
input_shape=(x_train.shape[1], 1)))
model.add(LSTM(60,activation='relu',recurrent_dropout=0.1))
model.add(Flatten())
model.add(Dense(1))
model.compile(optimizer='adam',loss='mean_squared_error')
model.fit_generator(generator, epochs=5,steps_per_epoch=len(generator))
```

trying to make this model when I do the .fit_generator I get this error and I couldn’t figure out why.