deep learning toolbox | manipulate activations

1 回表示 (過去 30 日間)
Marieke Mur
Marieke Mur 2019 年 8 月 6 日
回答済み: Sai Sri Pathuri 2019 年 8 月 9 日
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

回答 (1 件)

Sai Sri Pathuri
Sai Sri Pathuri 2019 年 8 月 9 日
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.

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by