original_docstring: Map MXNet's dot operator attributes to onnx's
      MatMul and Transpose operators based on the values set for
      transpose_a, transpose_b attributes.
docstring: Map MXNet's dot operator attributes to onnx's
  MatMul and Transpose operators based on the values set for
  transpose_a, transpose_b attributes.
docstring_tokens: Map MXNet ' s dot operator attributes to onnx ' s MatMul and Transpose operators based on the values set for transpose_a transpose_b attributes .
code: def convert_dot(node, **kwargs):
      """Map MXNet's dot operator attributes to onnx's
      MatMul and Transpose operators based on the values set for
      transpose_a, transpose_b attributes."""
      onnx = import_onnx_modules()
      proc_nodes = kwargs["proc_nodes"]
      node_inputs = node["inputs"]
      name = node["name"]
  
      input_a_idx = kwargs["index_lookup"][node_inputs[0][0]]
      input_node_a = proc_nodes[input_a_idx].name
      input_b_idx = kwargs["index_lookup"][node_inputs[1][0]]
      input_node_b = proc_nodes[input_b_idx].name
  
      attrs = node.get('attrs', {})
      trans_a_node = None
      trans_b_node = None
  
      trans_a = get_boolean_attribute_value(attrs, "transpose_a")
      trans_b = get_boolean_attribute_value(attrs, "transpose_b")
  
      op_name = "transpose" + str(kwargs["idx"])
      create_helper_trans_node(op_name, input_node_a, 'a')
      create_helper_trans_node(op_name, input_node_b, 'b')
  
      if trans_a:
          trans_a_node = create_helper_trans_node(op_name, input_node_a, 'a')
          input_node_a = op_name+"_a"
      if trans_b:
          trans_b_node = create_helper_trans_node(op_name, input_node_b, 'b')
          input_node_b = op_name+"_b"
  
      matmul_node = onnx.helper.make_node(
          'MatMul',
          inputs=[input_node_a, input_node_b],
          outputs=[name],
          name=name
      )
  
      if not trans_a and not trans_b:
          return [matmul_node]
      elif trans_a and not trans_b:
          return [trans_a_node, matmul_node]
      elif trans_b and not trans_a:
          return [trans_b_node, matmul_node]
      else:
          return [trans_a_node, trans_b_node, matmul_node]
code_tokens: def convert_dot ( node , ** kwargs ) : onnx = import_onnx_modules ( ) proc_nodes = kwargs [ "proc_nodes" ] node_inputs = node [ "inputs" ] name = node [ "name" ] input_a_idx = kwargs [ "index_lookup" ] [ node_inputs [ 0 ] [ 0 ] ] input_node_a = proc_nodes [ input_a_idx ] . name input_b_idx = kwargs [ "index_lookup" ] [ node_inputs [ 1 ] [ 0 ] ] input_node_b = proc_nodes [ input_b_idx ] . name attrs = node . get ( 'attrs' , { } ) trans_a_node = None trans_b_node = None trans_a = get_boolean_attribute_value ( attrs , "transpose_a" ) trans_b = get_boolean_attribute_value ( attrs , "transpose_b" ) op_name = "transpose" + str ( kwargs [ "idx" ] ) create_helper_trans_node ( op_name , input_node_a , 'a' ) create_helper_trans_node ( op_name , input_node_b , 'b' ) if trans_a : trans_a_node = create_helper_trans_node ( op_name , input_node_a , 'a' ) input_node_a = op_name + "_a" if trans_b : trans_b_node = create_helper_trans_node ( op_name , input_node_b , 'b' ) input_node_b = op_name + "_b" matmul_node = onnx . helper . make_node ( 'MatMul' , inputs = [ input_node_a , input_node_b ] , outputs = [ name ] , name = name ) if not trans_a and not trans_b : return [ matmul_node ] elif trans_a and not trans_b : return [ trans_a_node , matmul_node ] elif trans_b and not trans_a : return [ trans_b_node , matmul_node ] else : return [ trans_a_node , trans_b_node , matmul_node ]
short_docstring: Map MXNet's dot operator attributes to onnx's
  MatMul and Transpose operators based on the values set for
  transpose_a, transpose_b attributes.
short_docstring_tokens: Map MXNet ' s dot operator attributes to onnx ' s MatMul and Transpose operators based on the values set for transpose_a transpose_b attributes .
comment: """Map MXNet's dot operator attributes to onnx's
      MatMul and Transpose operators based on the values set for
      transpose_a, transpose_b attributes."""