"Proficient in MATLAB neural network" in the book example 10-16, when creating a BP network, the original wording is:
NET = NEWFF (Minmax (alphabet), [S1 s2],{' Logsig ' Logsig '}, ' Traingdx ');
Because there are hints in the process of operation, naturally want to change to a new way of writing (refer to the previous essay "Matlab Neural network function newff () Old and new usage difference"):
NET = NEWFF (alphabet, targets, S1, {' Logsig ', ' Logsig '}, ' Traingdx ');
NET.DIVIDEFCN = ";
Unfortunately, the ending is appalling:
then began to compare the study ... Finally, it is found that the new style of writing also needs to remove the input and output processing functions.
So, so far, in order to make the new style equivalent to the old style of writing, after NEWFF () also need to add the following:
NET.DIVIDEFCN = ";
Net.inputs{1}.processfcns = {};
net.outputs{2}.processfcns = {}; % If there are n hidden layers, the subscript here is n+1
"Analysis" in the new implementation, the default handler for NEWFF () is: fixunknowns, Removeconstantrows, Mapminmax. The culprit is Mapminmax, because it maps the input data of [0,1] to the [ -1,1] interval. and
We are based on the actual situation of the problem, that is, the two value image pixel value range is [0,1], thus using the definition domain also [0,1] the transfer function Logsig (), and Mapminmax () is mismatched.
Proficient in the new syntax of MATLAB neural network example 10-16