How to use a trained recurrent neural network on new input data (without having output data!)

1 次查看(过去 30 天)
I have trained a RNN in matlab and I want to use it to predict the outputs for an input vector. but in order to use the net, always the output vector is also required!
even for one-step ahead net without loop! I have tried to feed the one-step ahead net by creating a for loop and build an input vector in each time-step by combining X(t) and the output of RNN from previous time-step as follow:
Xi=0; % Assumed output for the first timestep
for j=1:size(X,2)
input={X(:,j);Xi}; % It is like using function
ys = nets(input); % get the output of RNN
y(end+1)=cell2mat(ys); % convert it to mat and save it
Xi=cell2mat(ys); % save the last output for next input
end
But the performance is very bad so it seems that something is wrong.
what is the solution?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by