Proficient in the new syntax of MATLAB neural network example 10-16

Source: Internet
Author: User
Tags network function

"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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.