展平与全连接得到特征值
import numpy as np
# 1、定义输入图片:4x4的图片,0表示白色,1表示黑色
image = np.array([
[0, 0, 1, 1],
[0, 0, 1, 1],
[1, 1, 0, 0],
[1, 1, 0, 0]
])
print('输入图片: \n', image)
# 2、卷积:用2x2滤波找对角特征
filter_simple = np.array([
[1, 0],
[0, 1]
])
print('滤波器: \n', filter_simple)
# 计算卷积结果
con[......]
