How can visualize tensorflow convolution filters?
In many documents, there are images about each filter like "Example". I want to visual my convolution filters like "Example" image, but I don't know how can visualize it.
How can I visualize my convolution filters?
Think about each convolutional filter as x
by x
matrix, where x
is the size of the filter. So your task is to put those matrices on a plot grid. I have made an example how to plot convolutional filters and output of convolutional layers using MNIST dataset, see conviz repository on github. Hope it helps you.
The result of the 2d convolution is a tensor [batch, in_height, in_width, in_channels]
. The image can be represented as a matrix [in_height, in_width, in_channels]
. So all you need to do is to grab a few images from your batch, and add them to your summary with tf.summary.image()
.
For a tutorial how to do this, take a look at this answer.
No those aren't the filters. You can read this paper which describes the procedures from converting the layer L's filters into these images. In short words what it does is taking some filter, and uses a technique similar but not the same as back-propagation to convert the filter into an image.
链接地址: http://www.djcxy.com/p/93204.html上一篇: 如何将按钮对齐到嵌套线性布局中的屏幕底部
下一篇: 如何可视化张量流卷积滤波器?