池化層
最大池化、平均池化
pytorch實現池化(下采樣)
最大池化
冗餘信息剔除、減小運算量
平均池化
相對於最大池池化的圖像亮度較小
pytorch實現反池化(上採樣)
最大值反池化
img_reconstruct = torch.randn_like(img_pool, dtype=torch.float)
maxunpool_layer = nn.MaxUnpool2d((2, 2), stride=(2, 2))
img_unpool = maxunpool_layer(img_reconstruct, indices)
線性層
激活函數層
非線性變換
sigmoid
tanh
relu