original_docstring: Map MXNet's SliceChannel operator attributes to onnx's Squeeze or Split
      operator based on squeeze_axis attribute
      and return the created node.
      
docstring: Map MXNet's SliceChannel operator attributes to onnx's Squeeze or Split
  operator based on squeeze_axis attribute
  and return the created node.
docstring_tokens: Map MXNet ' s SliceChannel operator attributes to onnx ' s Squeeze or Split operator based on squeeze_axis attribute and return the created node .
code: def convert_slice_channel(node, **kwargs):
      """Map MXNet's SliceChannel operator attributes to onnx's Squeeze or Split
      operator based on squeeze_axis attribute
      and return the created node.
      """
      onnx = import_onnx_modules()
      name = node["name"]
      proc_nodes = kwargs["proc_nodes"]
      inputs = node["inputs"]
      num_outputs = int(node.get("attrs", {})["num_outputs"])
      axis = int(node.get("attrs", {}).get("axis", 1))
      squeeze_axis = int(node.get("attrs", {}).get("squeeze_axis", 0))
  
      input_node_id = kwargs["index_lookup"][inputs[0][0]]
      input_node = proc_nodes[input_node_id].name
  
      if squeeze_axis == 1 and num_outputs == 1:
          node = onnx.helper.make_node(
              "Squeeze",
              [input_node],
              [name],
              axes=[axis],
              name=name,
          )
          return [node]
      elif squeeze_axis == 0 and num_outputs > 1:
          node = onnx.helper.make_node(
              "Split",
              [input_node],
              [name],
              axis=axis,
              split=[num_outputs],
              name=name,
          )
          return [node]
      else:
          raise NotImplementedError("SliceChannel operator with num_outputs>1 and"
                                    "squeeze_axis true is not implemented.")
code_tokens: def convert_slice_channel ( node , ** kwargs ) : onnx = import_onnx_modules ( ) name = node [ "name" ] proc_nodes = kwargs [ "proc_nodes" ] inputs = node [ "inputs" ] num_outputs = int ( node . get ( "attrs" , { } ) [ "num_outputs" ] ) axis = int ( node . get ( "attrs" , { } ) . get ( "axis" , 1 ) ) squeeze_axis = int ( node . get ( "attrs" , { } ) . get ( "squeeze_axis" , 0 ) ) input_node_id = kwargs [ "index_lookup" ] [ inputs [ 0 ] [ 0 ] ] input_node = proc_nodes [ input_node_id ] . name if squeeze_axis == 1 and num_outputs == 1 : node = onnx . helper . make_node ( "Squeeze" , [ input_node ] , [ name ] , axes = [ axis ] , name = name , ) return [ node ] elif squeeze_axis == 0 and num_outputs > 1 : node = onnx . helper . make_node ( "Split" , [ input_node ] , [ name ] , axis = axis , split = [ num_outputs ] , name = name , ) return [ node ] else : raise NotImplementedError ( "SliceChannel operator with num_outputs>1 and" "squeeze_axis true is not implemented." )
short_docstring: Map MXNet's SliceChannel operator attributes to onnx's Squeeze or Split
  operator based on squeeze_axis attribute
  and return the created node.
short_docstring_tokens: Map MXNet ' s SliceChannel operator attributes to onnx ' s Squeeze or Split operator based on squeeze_axis attribute and return the created node .
comment: """Map MXNet's SliceChannel operator attributes to onnx's Squeeze or Split
      operator based on squeeze_axis attribute
      and return the created node.
      """