@cell_attr_register
def __init__(self, in_channels, out_channels, kernel_size, stride=1, pad_mode='same', padding=0, dilation=1, group=1, has_bias=False, weight_init='normal', bias_init='zeros'):
    kernel_size = twice(kernel_size)
    stride = twice(stride)
    dilation = twice(dilation)
    super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, stride, pad_mode, padding, dilation, group, has_bias, weight_init, bias_init)
    self.conv2d = P.Conv2D(out_channel=self.out_channels, kernel_size=self.kernel_size, mode=1, pad_mode=self.pad_mode, pad=self.padding, stride=self.stride, dilation=self.dilation, group=self.group)
    self.bias_add = P.BiasAdd()
    if (pad_mode not in ('valid', 'same', 'pad')):
        raise ValueError((("Attr 'pad_mode' of 'Conv2d' Op passed " + str(pad_mode)) + ", should be one of values in 'valid', 'same', 'pad'."))
@cell_attr_register
def __init__(self, in_channels, out_channels, kernel_size, stride=1, pad_mode='same', padding=0, dilation=1, group=1, has_bias=False, weight_init='normal', bias_init='zeros'):
    kernel_size = twice(kernel_size)
    stride = twice(stride)
    dilation = twice(dilation)
    super(Conv2d, self).__init__(in_channels, out_channels, kernel_size, stride, pad_mode, padding, dilation, group, has_bias, weight_init, bias_init)
    self.conv2d = P.Conv2D(out_channel=self.out_channels, kernel_size=self.kernel_size, mode=1, pad_mode=self.pad_mode, pad=self.padding, stride=self.stride, dilation=self.dilation, group=self.group)
    self.bias_add = P.BiasAdd()
    if (pad_mode not in ('valid', 'same', 'pad')):
        raise ValueError((("Attr 'pad_mode' of 'Conv2d' Op passed " + str(pad_mode)) + ", should be one of values in 'valid', 'same', 'pad'."))