Difference between fitrnet and fitnet

130 views (last 30 days)
When I first learn to use neural networks, I usually used nnstart toolbox, which uses fitnet. However, when I started actually to build my own neural networks with more layers and optimal hyperparameters, I found that R2021a introduced fitrnet that looks more powerful. I was wondering what is the difference between these two neural network functions.

Accepted Answer

David Willingham
David Willingham on 20 Dec 2021
Edited: David Willingham on 18 May 2022
Hi Alex,
In R2021a, SMLT introduced the fitting functions fitcnet and fitrnet, which train shallow classification and regression neural network models. If you'd like to customize the network, there is a newer framework for building shallow and deep neural networks. Here are 2 examples of how to do this:
David Willingham
David Willingham on 27 Oct 2022
Hi Allesandro,
The two functions have different solver implementations under the hood. Also they have different number of layers and layers sizes.
My recommendation is that you can always try both and see which method works best for the given application.

Sign in to comment.

More Answers (0)


Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!