padded.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:reseg 作者: fvisin 项目源码 文件源码
def __init__(
            self,
            l_in,
            patch_size,
            stride,
            data_format='bc01',
            centered=True,
            name='',
            **kwargs):
        """A Layer that zero-pads the input

        Parameters
        ----------
        l_in : lasagne.layers.Layer
            The input layer
        patch_size :  iterable of int
            The patch size
        stride : iterable of int
            The stride
        data_format : string
            The format of l_in, either `b01c` (batch, rows, cols,
            channels) or `bc01` (batch, channels, rows, cols)
        centered : bool
            If True, the padding will be added on both sides. If False
            the zero padding will be applied on the upper left side.
        name = string
            The name of the layer, optional
        """
        super(DynamicPaddingLayer, self).__init__(l_in, name, **kwargs)
        self.l_in = l_in
        self.patch_size = patch_size
        self.stride = stride
        self.data_format = data_format
        self.centered = centered
        self.name = name
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号