I am getting error as " Too many input arguments" . i am trying develop a neural network based model .
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
??? Error using ==> TS1>feed_forward_signals
Too many input arguments.
Error in ==> TS1>Run_Neural_Net_Regression at 144
feed_forward_signals(hidden_input_wts,input,hidden,hidden_bias,25,8,0)
Error in ==> TS1 at 100
Run_Neural_Net_Regression(hidden_input_wts,input,hidden,hidden_bias,hidden_output_wts,...
Error in ==> Neural_network>Calculate_Callback at 1162
data = TS1();
Code
scale_inputs(input,0,1,25,max_input,min_input);
Run_Neural_Net_Regression(hidden_input_wts,input,hidden,hidden_bias,hidden_output_wts,...
output,output_bias);
unscale_targets(output,0,1,1,max_target,min_target);
% handles.TS=output(1);
% guidata(hObject, handles)
data.TS = 300;
% setappdata(fig_handle, 'metricdata', data);
% set(handles.TS, 'String', data.TS);
x=100;
function scale_inputs(input,minimum,maximum,size,max_input,min_input)
for i = 1:size
delta = (maximum-minimum)/(max_input(i)- min_input(i));
input(i) = minimum - delta*min_input(i)+ delta*input(i);
end
end
function unscale_targets(output,minimum,maximum,size,max_target,min_target)
for i = 1:size
delta = (maximum-minimum)/(max_target(i)-min_target(i));
output(i) = (output(i) - minimum + delta*min_target(i))/delta;
end
end
function feed_forward_signals(MAT_INOUT,V_IN,V_OUT,V_BIAS,size1,size2) %%%,layer)
for row = 1:size2
V_OUT(row)=0;
for col = 1:size1
V_OUT(row)=V_OUT(row)+MAT_INOUT(row,col)*V_IN(col);
end
V_OUT(row)=V_OUT(row)+V_BIAS(row);
%if layer==0
% V_OUT(row) = exp(V_OUT(row));
%end
% if layer==1
% V_OUT(row) = exp(V_OUT(row));
% end
end
end
function Run_Neural_Net_Regression(hidden_input_wts,input,hidden,hidden_bias,hidden_output_wts,...
output,output_bias)
feed_forward_signals(hidden_input_wts,input,hidden,hidden_bias,25,8,0)
feed_forward_signals(hidden_output_wts,hidden,output,output_bias,8,1,1)
end
end
0 Kommentare
Akzeptierte Antwort
Adam
am 29 Okt. 2014
This is just a basic case of reading what the error message tells you. Even in the unformatted form you posted it it is easy to see the function takes 6 arguments and you have passed in 7.
Error messages are there to be helpful rather than just a splash of red telling you "something is wrong"!
6 Kommentare
Adam
am 2 Nov. 2014
Well, if you changed the code as I suggested you should no longer have the two size arguments passed in so the 25 and 8 I think should no longer be there assuming they are the size arguments.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!