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 CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by