File Exchange

image thumbnail

Gradient from Neural Network

version 1.0 (43.2 KB) by

Function that takes a NN and creates a new NN that gives the gradient.



View License

The form of a single layer feed forward neural network lends itself to finding the gradient. This is useful when the network is used for surrogate optimization or other algorithms that use gradients. Requires creating a file by modifying a NN toolbox file.

Comments and Ratings (4)

Hi Alan,

I am working with 2013 and I modified 'tansig.m' with its derivative as d= 1-a.*a
but there is an error in 'nnModuleInfo'; saying '' undefined function or variable '' ''


duc (view profile)

i want to download it

Alan Jennings

Alan Jennings (view profile)

This needs a change to work with 2010 (when you change the size of the output, the weights change differently then before), I've done it and will get it in here soon. Again, Please let me know if this has helped you.

Alan Jennings

Alan Jennings (view profile)

Let me know if a Hessian would be helpful. I'm sure it could be done, but I'm wondering if there's interest.

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video