original_docstring: Map MXNet's convolution operator attributes to onnx's Conv operator
      and return the created node.
      
docstring: Map MXNet's convolution operator attributes to onnx's Conv operator
  and return the created node.
docstring_tokens: Map MXNet ' s convolution operator attributes to onnx ' s Conv operator and return the created node .
code: def convert_convolution(node, **kwargs):
      """Map MXNet's convolution operator attributes to onnx's Conv operator
      and return the created node.
      """
      onnx = import_onnx_modules()
      name = node["name"]
      inputs = node["inputs"]
  
      num_inputs = len(inputs)
  
      proc_nodes = kwargs["proc_nodes"]
      input_node = proc_nodes[kwargs["index_lookup"][inputs[0][0]]].name
      weights_node = proc_nodes[kwargs["index_lookup"][inputs[1][0]]].name
  
      if num_inputs > 2:
          bias_node = proc_nodes[kwargs["index_lookup"][inputs[2][0]]].name
  
      attrs = node.get("attrs")
  
      kernel_dims = list(parse_helper(attrs, "kernel"))
      stride_dims = list(parse_helper(attrs, "stride", [1, 1]))
      pad_dims = list(parse_helper(attrs, "pad", [0, 0]))
      num_group = int(attrs.get("num_group", 1))
      dilations = list(parse_helper(attrs, "dilate", [1, 1]))
  
      pad_dims = pad_dims + pad_dims
  
      input_nodes = [input_node, weights_node]
      if num_inputs > 2:
          input_nodes.append(bias_node)
  
      conv_node = onnx.helper.make_node(
          "Conv",
          inputs=input_nodes,
          outputs=[name],
          kernel_shape=kernel_dims,
          strides=stride_dims,
          dilations=dilations,
          pads=pad_dims,
          group=num_group,
          name=name
      )
  
      return [conv_node]
code_tokens: def convert_convolution ( node , ** kwargs ) : onnx = import_onnx_modules ( ) name = node [ "name" ] inputs = node [ "inputs" ] num_inputs = len ( inputs ) proc_nodes = kwargs [ "proc_nodes" ] input_node = proc_nodes [ kwargs [ "index_lookup" ] [ inputs [ 0 ] [ 0 ] ] ] . name weights_node = proc_nodes [ kwargs [ "index_lookup" ] [ inputs [ 1 ] [ 0 ] ] ] . name if num_inputs > 2 : bias_node = proc_nodes [ kwargs [ "index_lookup" ] [ inputs [ 2 ] [ 0 ] ] ] . name attrs = node . get ( "attrs" ) kernel_dims = list ( parse_helper ( attrs , "kernel" ) ) stride_dims = list ( parse_helper ( attrs , "stride" , [ 1 , 1 ] ) ) pad_dims = list ( parse_helper ( attrs , "pad" , [ 0 , 0 ] ) ) num_group = int ( attrs . get ( "num_group" , 1 ) ) dilations = list ( parse_helper ( attrs , "dilate" , [ 1 , 1 ] ) ) pad_dims = pad_dims + pad_dims input_nodes = [ input_node , weights_node ] if num_inputs > 2 : input_nodes . append ( bias_node ) conv_node = onnx . helper . make_node ( "Conv" , inputs = input_nodes , outputs = [ name ] , kernel_shape = kernel_dims , strides = stride_dims , dilations = dilations , pads = pad_dims , group = num_group , name = name ) return [ conv_node ]
short_docstring: Map MXNet's convolution operator attributes to onnx's Conv operator
  and return the created node.
short_docstring_tokens: Map MXNet ' s convolution operator attributes to onnx ' s Conv operator and return the created node .
comment: """Map MXNet's convolution operator attributes to onnx's Conv operator
      and return the created node.
      """