# 深度学习网络层之上采样（Unpooling）

## L2 pooling

[a^l={1\over k}\sqrt{\sum_{j=1}^k(a_j^{l-1})^2} ]

pooling除了仅输出一个值, 也可以输出top k个(mix pooling).

## CNN中的上采样

Unpooling:

• 最近的邻居，以复制的形式。

[En]

* nearest neighbors, in the form of replication.

• “Bed of Nails”:其他位置用0填充

• “Max Unpooling” 在对称的max pooling中记录最大值的位置,在unpooling时将最大值位置设置为特征值,其他位置置0.

• 转置卷积:Transpose Convolution,参数可学习,而上述的上采样方式都是固定的函数,不可学习.

## 转置卷积

[En]

In the process of transpose convolution calculation, the input value of each element is taken as the weight of the convolution kernel, multiplied as the corresponding upsampling output of the element, and the overlapping output parts of different inputs are directly added as the output. The schematic diagram is as follows:

2-D转置卷积操作：在输入的相邻像素间填充 stride-1个0，再在边缘填充 kernel_size - 1 - crop个 zero-padding，再进行卷积运算。最后一步还要进行裁剪。

[En]

Transpose convolution is also known as decimal step convolution (Fractionally Strided Convolution). If the step in forward convolution (s > 1), then the step in transpose convolution (s’)

### 转置卷积的用途

• CNN可视化：通过转置卷积将feature map还原到像素空间，以观察特定的feature map对哪些pattern的图片敏感。
• 上采样：图像语义分割或生成对抗网络需要像素级预测，对图像大小要求较高。
[En]

* up-sampling: pixel-level prediction is required in image semantic segmentation or generation countermeasure network, and higher image size is required.

Original: https://www.cnblogs.com/makefile/p/unpooling.html
Author: 康行天下
Title: 深度学习网络层之上采样（Unpooling）

(0)