I am getting error as " Too many input arguments" . i am trying develop a neural network based model .
1 view (last 30 days)
Show older comments
??? 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 Comments
Accepted Answer
Adam
on 29 Oct 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 Comments
Adam
on 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.
More Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows 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!