MATLAB: What is the purpose of the last line

Deep Learning ToolboxMATLABneural network

net = newff(Iin, Target, 10, {'logsig' 'logsig'}, 'trainscg');
net.trainParam.perf = 'sse';
net.trainParam.epochs = 500;
net.trainParam.goal = 1e-5;
net.trainParam.lr=0.15;
net.trainParam.mc=0.8;
net = init(net);
I know init is used for initializing a ts-collection object with new time or new time series. So, is it used in the last line to collect the objects of all net.trainparam lines? I don’t understand it. Please help me.

Best Answer

init initializes a net with random weights.
However, the command is totally unnecessary because newff is self-initializing.
So: Delete it and don't worry about it.
However, I am concerned about why you are not using MATLAB defaults for your design. Try
net = newff(Iin,Target) % NO SEMICOLON
Then see the defaults that MATLAB gives you free of charge.
Compare with the ones you have chosen
Also try the code in
help newff
Hope this helps.
Thank you for formally accepting my answer
Greg