Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to visulize the learned filter of each layer? #464

Closed
tzczsq opened this issue Mar 15, 2016 · 1 comment
Closed

How to visulize the learned filter of each layer? #464

tzczsq opened this issue Mar 15, 2016 · 1 comment
Labels

Comments

@tzczsq
Copy link

tzczsq commented Mar 15, 2016

Hi, could you please tell me how to visulize the learned filter of each CNN layer?
The following answers tell me how to only visualize the learned filters of the first CNN layer, but could not visulize the other CNN layers. It seems that if the filter response is not 3 channel, we could not visulize it. However, Caffe can show the filter response of each CNN layer.

#94
You can just recover the filters and use Matlab's functions to display them as images. For example after loading a pretrained net from http://www.vlfeat.org/matconvnet/pretrained/ :
imshow( net.layers{1}.filters(:, :, 3, 1), [] ) ;

You may find the VLFeat function vl_imarraysc useful to display several filters.
http://www.vlfeat.org/matlab/vl_imarraysc.html

See also the tutorial:
http://www.robots.ox.ac.uk/~vgg/practicals/cnn/index.html

@lenck lenck added the question label Apr 14, 2016
@lenck
Copy link
Contributor

lenck commented Apr 14, 2016

Hi, nobody really knows :) You can either take the maximum of the filter values to see the spatial distribution of its values but it impossible to tell anything more that 'Hmm, nice 3x3 filters'.
But one thing you can do is to play with the inverse of the whole network. E.g. using Aravindh's work which allows you to project single image activations into the image domain.

@lenck lenck closed this as completed Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants