input of neural network

Am working on neural network , my problem is if I want the input to be one element and the output is array which is the target also , matlab will give me error that the network requires the input and target to be equal size how can I avoid this ?

2 Kommentare

the cyclist
the cyclist am 11 Mär. 2013
It would be helpful if you could give a significantly greater amount of detail about the size of your arrays, and the exact calling syntax.
The ideal is to show us a small amount of self-contained code that exhibits the problem.
dalya
dalya am 11 Mär. 2013
x0=1;
h={ 1.9587
0.2019
0.1143
0.7755
0.9941
0.2891
0.1365
1.1539
0.4221
0.7484
1.7563
0.8967
3.2528
6.0139
0.3404
27.0322
80.6179
122.5317
140.2751
143.8728
143.0217
134.0189
104.6347
53.0908
8.2582
1.7217
6.7878
0.1695
2.6677
0.0643
1.5761
0.1948
0.4570
1.0072
0.2943
0.0525
0.8049
1.5823
1.5565
0.6357};
m0=h';
net = newff(x0,m0,10);
net = train(net,x0,m0);
outputs = net(x0);
n=cell2mat(outputs)
l=cell2mat(x0)
k=cell2mat(m0)
polar(l*pi/180,k,'b')
hold on
polar(l*pi/180,n,'r')
this is my code .. when the onput is set to x0=1 I need the output to be m0

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Greg Heath
Greg Heath am 11 Mär. 2013
Bearbeitet: Greg Heath am 11 Mär. 2013

0 Stimmen

If you have N I-dimensional input vectors and the corresponding N O-dimensional output vectors, the input and output matrices will have the dimensions
[ I N ] = size(input)
[ O N ] = size(target)
Thank you for formally accepting my answer
Greg

1 Kommentar

dalya
dalya am 11 Mär. 2013
my problem is the input and the output have different size so the network give me an error

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by