我想提取conv2D图层的过滤器并将其保存到文件中。
我使用了Model.layers[i].weights
或Model.layers[i].get_weights()
,并且获得了3D内核,
shape= (5,5,5,10)
,所以我不知道我要打印的是图层输出还是滤镜本身,因为我指定了kernel_size=(5,5)
,即5 5 1而我却得到5 5 5
输入到CONV2D的大小13 13 5(channels_last)。
CONV2D 5 5 50的输出大小(过滤器= 10)。
layers.DepthwiseConv2D(kernel_size=(5,5), strides=(2,2),depth_multiplier=10, use_bias=False, dilation_rate=(1, 1)),