什么时候对卷积层使用哪种类型的填充? [英] When to use what type of padding for convolution layers?

查看:350
本文介绍了什么时候对卷积层使用哪种类型的填充?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道当我们在神经网络中使用卷积层时,我们通常使用填充和主要是常量填充(例如零填充).并且存在不同类型的填充(例如,对称,反射,常量).但是我不确定使用不同的填充方法的优缺点以及何时使用哪种填充方法.

I know when we are using convolution layers in a neural net we usually use padding and mainly constant padding(e.g. zero padding). And there are different kinds of padding(e.g. symmetric, reflective, constant). But I am not sure what are the advantages and disadvantages of using different padding methods and when to use which one.

推荐答案

这实际上取决于神经网络的预期情况.我不会说它的利弊.这次,世界无法采用二进制方案.

it really depends on the situation for what the neural network is intended. I would not tell it pros and cons. This time the world cannot put into a binary scheme.

我会给你一些有趣的链接:

I will give you some interesting links:

https: //adeshpande3.github.io/A-Beginner%27s-Guide-To-Understanding-Convolutional-Neural-Networks-Part-2/

http://web.stanford.edu/class/cs20si/lectures/

当您尝试设计网络时,请开始考虑应该为它设计什么.然后,您尝试一些操作,如果在卷积网络中,有效的填充会使图像变小,而完全填充会使图像变大,这是合乎逻辑的,但是它使用例如零填充,在边缘加0并可能导致蒙着面纱...依此类推...您必须尝试很多...

When you try to design a network, then start to think about what it should be designed for. Then, you try some things, it will be logical that , in case of convolutional networks, valid padding makes the image smaller and full padding makes the image bigger, but it uses, e.g zero padding, what adds 0 at the edges and could lead to veils... and so on... you must try a lot...

对于像素级深度卷积网络,人们使用valid,例如语义分割.没有/更少的拖影效果". 对于对象检测,人们使用same,对于检测到的对象只需要一个边界框.

For pixelwise deep convolutional networks, people use valid, such as semantic segmentation. No/less "smear-effect". For object detection, people use same, only a bounding box is needed for the detected object.

HTH

这篇关于什么时候对卷积层使用哪种类型的填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆