I want to predict a product’s price throughout 24 hours during one day, my dataset has 1488 records, I’m using 1000 values to training and 488 to test my model.
Initially the  test_inputs  item will contain 24 items. Inside a  for  loop these 24 items will be used to make predictions about the first item from the test set, for instance, the item number 1001. The predict value will then be appended to the  test_inputs  list. During the second iteration, again the last 24 items will be used as input and a new prediction will be made which will then be appended to the  test_inputs  list again.
model.eval()
for i in range(fut_pred):
seq = torch.FloatTensor(test_inputs[-train_window:])
with torch.no_grad():
model.hidden = (torch.zeros(1, 1, model.hidden_layer_size),
torch.zeros(1, 1, model.hidden_layer_size))
test_inputs.append(model(seq).item())