deep learning toolbox | manipulate activations

1 visualización (últimos 30 días)
Marieke Mur
Marieke Mur el 6 de Ag. de 2019
Respondida: Sai Sri Pathuri el 9 de Ag. de 2019
I'm computing activations to images in a trained deep neural network. Is it possible to manipulate (let's say add noise to) the activations of a certain layer before computing the activations of the next layer?
See below for example code for a single image. This code computes the activations to the image in each layer of the network. What I'd like to do now is to compute activations for e.g. layer 1, then manipulate these activations, and pass them on to layer 2. Is there existing functionality within the deep learning toolbox to do this?
(I went through the toolbox functions, but none of the existing functions seems suitable for this purpose.)
im = imread(image.bmp);
net = alexnet;
nLayers = numel(net.Layers);
acti = cell(nLayers,1);
for layerI = 1: nLayers
layerName = net.Layers(layerI).Name;
acti{layerI} = activations(net,im,layerName);
end % layerI

Respuestas (1)

Sai Sri Pathuri
Sai Sri Pathuri el 9 de Ag. de 2019
There is no function to manipulate activations in a trained neural network. Instead, you may create a custom layer for required activations.
There is a similar question. You may also refer it.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by