A simple question regarding NNSTART in MATLAB

51 views (last 30 days)
Sheldon Nyce
Sheldon Nyce on 6 Oct 2019
Answered: Piyush Dubey on 9 Oct 2019
Good day MATLAB gurus.
I recently purchased MATLAB, and am trying to get started using a neural network. I have had no prior experience working with MATLAB, but I did complete the MATLAB Onramp course online. I have built my first neural network (converting degrees celcius to degrees farenheit) and it worked well! So that's where I'm at - so please excuse my lack of experience.
I think my question is quite simple. Hopefully it might be just as easy to answer.
How do I increase the number of hidden layers in a neural network using the MATLAB nnstart command and pattern fitting GUI? My second question is; how do I generate the code that the GUI uses to find the solution? Just to confirm: I'm not asking how to generate the output code for the NN training (that's quite simple). I want to see the code that the GUI uses to find the NN solution.
  • Typing "nnstart" in the command window gets me:
  • I click on "fitting app"
  • Go through the setup process
  • arrive at the following window:
There appears to be no way of increasing the number of layers at this point...
Thereafter I would like to see the code that made this whole process possible.
Is there a solution to the two questions? Can anyone help me?
I would appreciate the assistance. I'm trying to learn, so please be gentle.

Answers (1)

Piyush Dubey
Piyush Dubey on 9 Oct 2019
Hi Sheldon,
As you can see in the 2nd image titled 'Neural Fitting (nftool)', the line 'Define a fitting neural network. (fitnet)' mentions that it uses the fitnet function which has a fixed number of hidden layers. I would recommend you to go through the 'Deep Learning Onramp' which can help you to get started with deep neural networks in MATLAB. You can also refer to the following example which details how a deep neural network is trained from scratch.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by