def _keras_conv2d(converter, interiors, inputs):
    x_in = converter.outputs[inputs[0]]
    conv_op = interiors['Conv2D']
    kernel = interiors['kernel']
    k = _nodef_to_private_pond(converter, kernel)
    try:
        bias = interiors['bias']
        b = _nodef_to_private_pond(converter, bias)
        for ax in [0, (- 1), (- 1)]:
            b = b.expand_dims(axis=ax)
    except KeyError:
        b = None
    input_shape = x_in.shape.as_list()
    shape = [i.size for i in kernel.attr['value'].tensor.tensor_shape.dim]
    fmt = conv_op.attr['data_format'].s.decode('ascii')
    strides = int(max(conv_op.attr['strides'].list.i))
    padding = conv_op.attr['padding'].s.decode('ascii')
    layer = Conv2D(input_shape, shape, strides=strides, padding=padding, channels_first=(fmt == 'NCHW'))
    layer.initialize(initial_weights=k, initial_bias=b)
    out = layer.forward(x_in)
    return out
def _keras_conv2d(converter, interiors, inputs):
    x_in = converter.outputs[inputs[0]]
    conv_op = interiors['Conv2D']
    kernel = interiors['kernel']
    k = _nodef_to_private_pond(converter, kernel)
    try:
        bias = interiors['bias']
        b = _nodef_to_private_pond(converter, bias)
        for ax in [0, (- 1), (- 1)]:
            b = b.expand_dims(axis=ax)
    except KeyError:
        b = None
    input_shape = x_in.shape.as_list()
    shape = [i.size for i in kernel.attr['value'].tensor.tensor_shape.dim]
    fmt = conv_op.attr['data_format'].s.decode('ascii')
    strides = int(max(conv_op.attr['strides'].list.i))
    padding = conv_op.attr['padding'].s.decode('ascii')
    layer = Conv2D(input_shape, shape, strides=strides, padding=padding, channels_first=(fmt == 'NCHW'))
    layer.initialize(initial_weights=k, initial_bias=b)
    out = layer.forward(x_in)
    return out