How do I compute the gradient of a convolutional neural network with respect to a given input image?

9 views (last 30 days)
I would like to do a gradient ascent of a CNN-based classification network with respect to the input image in order to maximize the score of a certain class. Is there any functionality to do so? The layer template for defining new deep learning layers has a "backward" function; it would be great to be able to call such a function for the built-in layers, too.

Answers (1)

Sai Bhargav Avula
Sai Bhargav Avula on 26 Sep 2019
Hi,
The dlgradient can be used for computing the gradient.

Categories

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!