简体   繁体   English

可视化每个CNN层的学习过滤器

[英]Visualize the learned filter of each CNN layer

anyone please tell me how to visualize the learned filter of each CNN layer? 有人请告诉我如何可视化每个CNN层的学习过滤器? 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. 以下答案告诉我如何仅可视化第一个CNN层的学习过滤器,而不能可视化其他CNN层。

1) You can just recover the filters and use Matlab's functions to display them as images. 1)您可以恢复过滤器并使用Matlab的功能将其显示为图像。 For example after loading a pretrained net from http://www.vlfeat.org/matconvnet/pretrained/ : 例如,从http://www.vlfeat.org/matconvnet/pretrained/加载预训练的网络后:

imshow( net.layers{1}.filters(:, :, 3, 1), [] ) ;

2) You may find the VLFeat function vl_imarraysc useful to display several filters. 2)您可能会发现VLFeat函数vl_imarraysc对显示多个过滤器很有用。 http://www.vlfeat.org/matlab/vl_imarraysc.html http://www.vlfeat.org/matlab/vl_imarraysc.html

For visualizing filters in intermediate layers. 用于可视化中间层中的过滤器。 There are several techniques: 有几种技术:

(1) show one or three channels as grayscale or RGB at a time. (1)一次显示一个或三个通道为灰度或RGB。 It's not very informative since they filters of ResNet and VGG are small 3x3. 由于它们的ResNet和VGG过滤器均为3x3小型,因此它的信息不是很丰富。

(2) Turn off other units. (2)关闭其他单元。 Backpropgate only this unit to the input space. 仅将本机反向传播到输入空间。 You can see a pattern that reflects what this unit cares about. 您可以看到一种模式,该模式反映了本机的要求。 There are many papers that use similar techniques. 有许多使用类似技术的论文。 eg, Zeiler, Matthew D., and Rob Fergus. 例如Zeiler,Matthew D.和Rob Fergus。 "Visualizing and understanding convolutional networks." “可视化和理解卷积网络。” European conference on computer vision. 欧洲计算机视觉会议。 2014. 2014。

(3) Find input patches that maximally activate this unit and see what they are. (3)找到可以最大程度激活本机的输入音色,并查看它们是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CNN - 将Conv层的输出重新整形为致密层 - CNN - Reshaping output from Conv layer to dense layer 如何获得经过训练的CNN模型的某一层的输出[Tensorflow] - How to get the output of certain layer of trained CNN model [Tensorflow] 从较低的fc层微调CNN - fine-tuning a CNN from a lower fc layer 为什么我们在CNN末端使用全连接层? - Why do we use fully-connected layer at the end of CNN? 快速R-CNN中ROI层的目的是什么? - What is the purpose of the ROI layer in a Fast R-CNN? CNN 的过滤器是如何学习的? - How are filters for CNNs learned? Gabor滤波器上的每个超像素 - Gabor Filter on on each Superpixel 使用 pcl::CropBox 过滤器裁剪点云后,无法可视化裁剪的点云 - After copping a Point Cloud using pcl::CropBox filter, can't visualize that cropped Point Cloud 如何使用张量流来构建CNN模型,其中每个“分支”都是独立的,直到在最后一步被加入为止? - How to use tensor flow to build a CNN model where each “branch” is separate until being joined at the last step? 为什么在 CNN 迁移学习期间,我的损失和准确率会随着每个 epoch 不断上升和下降? - Why does my loss and accuracy keep going up and down with each epoch during CNN transfer learning?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM