Multi-dim input in Elman Net
1 view (last 30 days)
Show older comments
Hi~ I used newelm(simple recurrent network) to train the network. But my input data is a 2-d vector on each time-step , not just a single number. So, how to address this problem ? My code seems wrong:
The input has 3 sequences, and each sequence have 5 time-steps. And again each time-step is a 2-d vector. The output is similar.
% code
P = [ [1 1] [2 2] [3 3] [4 4] [5 5];
[2 2] [3 3] [4 4] [5 5] [6 6];
[3 3] [4 4] [5 5] [6 6] [7 7]; ]';
T = [ [2 2] [3 3] [4 4];
[3 3] [4 4] [5 5];
[4 4] [5 5] [6 6]; ]';
th = [0 10; 0 10; 0 10; 0 10; 0 10;];
net = newelm(th, [5, 3], {'tansig', 'purelin'});
view(net);
net.trainParam.epochs = 1000;
net = init(net);
net = train(net, P, T);
y = sim(net, P);
7 Comments
Answers (0)
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!