def _conv2d(converter, node, inputs):
    x_in = converter.outputs[inputs[0]]
    kernel = converter.outputs[inputs[1]]
    if isinstance(kernel, tf.NodeDef):
        shape = [i.size for i in kernel.attr['value'].tensor.tensor_shape.dim]
        w = _nodef_to_private_pond(converter, kernel)
    else:
        shape = kernel.shape.as_list()
        w = kernel
    fmt = node.attr['data_format'].s.decode('ascii')
    layer = Conv2D(x_in.shape.as_list(), shape, strides=int(max(node.attr['strides'].list.i)), padding=node.attr['padding'].s.decode('ascii'), channels_first=(fmt == 'NCHW'))
    layer.initialize(initial_weights=w)
    out = layer.forward(x_in)
    return out
def _conv2d(converter, node, inputs):
    x_in = converter.outputs[inputs[0]]
    kernel = converter.outputs[inputs[1]]
    if isinstance(kernel, tf.NodeDef):
        shape = [i.size for i in kernel.attr['value'].tensor.tensor_shape.dim]
        w = _nodef_to_private_pond(converter, kernel)
    else:
        shape = kernel.shape.as_list()
        w = kernel
    fmt = node.attr['data_format'].s.decode('ascii')
    layer = Conv2D(x_in.shape.as_list(), shape, strides=int(max(node.attr['strides'].list.i)), padding=node.attr['padding'].s.decode('ascii'), channels_first=(fmt == 'NCHW'))
    layer.initialize(initial_weights=w)
    out = layer.forward(x_in)
    return out