在这里,我们使用tensorflow底层的API来直观的进行卷积和池化可视化。
一、打开图像并转张量
首先导入相关的包
%matplotlib inline
!pip install scikit-image # Uncomment to install this module
!pip install matplotlib # Uncomment to install this module
import tensorflow as tf
import matplotlib
from matplotlib import pyplot as plt
from skimage import io # Package to simply read images
然后打开我们的示例图像。
[En]
Then open our example image.
image = io.imread("123.png")
print("Image shape: {}".format(image.shape))
plt.imshow(image, cmap=plt.cm.gray)
Image shape: (728, 852, 3)
图像显示如下
为了将此图像提供给 TensorFlow 操作,我们首
Original: https://blog.csdn.net/bashendixie5/article/details/122540795
Author: 坐望云起
Title: 机器学习笔记 – tensorflow卷积和池化的可视化
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/514878/
转载文章受原作者版权保护。转载请注明原作者出处!