Visualising the features in a convolutional neural network

조회 수: 11 (최근 30일)
Sivaramakrishnan Rajaraman
Sivaramakrishnan Rajaraman 2017년 10월 5일
답변: Philip Brown 2023년 5월 4일
I’ve been using the matlab example for visualisation of features of a CNN model and visualized the convolutional network layers of all the sequential DL models. With the R2017b release we have the DAG network googLeNet as well. I’m not able to use the available code for sequential models to visualize the features in the googLeNet DAG model. Do we have a way of doing this? Can matlab give me an example for this visualisation?

답변 (3개)

Javier Pinzón
Javier Pinzón 2017년 11월 16일
편집: Javier Pinzón 2017년 11월 16일
Hello All
Activations can be see in a DAGNetwork, only the way of write it variesfor the DAG, You need to select the Layer which want to get the activations, and then follow the next lines:
[height1, width1, ~] = size(im);
if isa(net,'DAGNetwork') == 1
featureMap = activations(net, im, 'Relu_conv1');
% The feature map is stored in the first channel
Map1 = featureMap(:, :, 1);
Map1 = imresize(Map1, [height1, width1]);
figure
montage(cat(4,im,...
repmat(Map1*255,[1 1 3])), 'Size', [1 2]);
end
the activation feature map is in the position 1 of the matrix, and you can do that with any of the layers.
Hope it helps and is what you wanted. If any question, you may ask me.
Regards,
Javier
  댓글 수: 2
Muhammad Arsalan
Muhammad Arsalan 2018년 1월 11일
Hello,
How can we find the feature like in attached image from a DAGNetwork. The code you provided does not give the color features as attached in attached image by deeDreamImage. or is there any way to use deepDreamImage for DAGNetwork ???
Salma Hassan
Salma Hassan 2018년 8월 11일
i confused with this problem when i visualize the feature by the code in this link https://www.mathworks.com/help/nnet/examples/visualize-features-of-a-convolutional-neural-network.html i get features for alexnet architecture , but I expected features for my dataset which is completely different than alexnet

댓글을 달려면 로그인하십시오.


keke zhang
keke zhang 2017년 11월 4일
Hi Sivaramakrishnan Rajaraman: I also meet the problem, are you solve it now?
  댓글 수: 3
keke zhang
keke zhang 2017년 11월 7일
Hi,I am not find other options. It is a pity.
Arun A M
Arun A M 2020년 9월 5일
https://in.mathworks.com/help/deeplearning/ug/visualize-features-of-a-convolutional-neural-network.html

댓글을 달려면 로그인하십시오.


Philip Brown
Philip Brown 2023년 5월 4일
If you're looking for using the deepDreamImage function for DAGNetwork networks, that's supported from R2019b.

카테고리

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