CaioCampelo:

I’ve been trying for days to use this trained network to predict future values, I can do the training, and validation, but when it comes to using it to predict future days, I can’t, I would like to know how I use this network already trained to predict values ​​that the network has not yet seen, values ​​for the following days, not validation, in addition to validation, thank you very much ^^
import pandas as pd
import numpy as np
import math
import torch
import matplotlib.pyplot as plt
import yfinance as yf
data = yf.download(‘EURUSD=X’, start=‘2021-01-28’, end=‘2021-02-4’, interval = “1m”)
data = data.Close
torch.cuda.is_available()
device = torch.device(“cuda:0”)


This might help
net = newff(observations,targets,10);
[net,tr] = train(net,observations',targets');
erg = zeros(size(test_mat,1),1);
for i = 1: size(test_mat,1)
    y = sim(net,test_mat(i,:)');
    erg(i)=find(compet(y));
end

where observations is your training set targets are the known values of the hindcast and test_mat are the values for the forecast. In erg the predictions for the forecast are stored.