original_docstring: Map MXNet's Cast operator attributes to onnx's Cast operator
      and return the created node.
      
docstring: Map MXNet's Cast operator attributes to onnx's Cast operator
  and return the created node.
docstring_tokens: Map MXNet ' s Cast operator attributes to onnx ' s Cast operator and return the created node .
code: def convert_cast(node, **kwargs):
      """Map MXNet's Cast operator attributes to onnx's Cast operator
      and return the created node.
      """
      onnx = import_onnx_modules()
      name = node["name"]
      proc_nodes = kwargs["proc_nodes"]
      inputs = node["inputs"]
      dtype = node["attrs"]["dtype"]
  
      # dtype can be mapped only with types from TensorProto
      # float32 is mapped to float and float64 to double in onnx
      # following tensorproto mapping https://github.com/onnx/onnx/blob/master/onnx/mapping.py
      if dtype == 'float32':
          dtype = 'float'
      elif dtype == 'float64':
          dtype = 'double'
  
      input_node_id = kwargs["index_lookup"][inputs[0][0]]
      input_node = proc_nodes[input_node_id].name
  
      node = onnx.helper.make_node(
          "Cast",
          [input_node],
          [name],
          to=getattr(onnx.TensorProto, dtype.upper()),
          name=name,
      )
      return [node]
code_tokens: def convert_cast ( node , ** kwargs ) : onnx = import_onnx_modules ( ) name = node [ "name" ] proc_nodes = kwargs [ "proc_nodes" ] inputs = node [ "inputs" ] dtype = node [ "attrs" ] [ "dtype" ] if dtype == 'float32' : dtype = 'float' elif dtype == 'float64' : dtype = 'double' input_node_id = kwargs [ "index_lookup" ] [ inputs [ 0 ] [ 0 ] ] input_node = proc_nodes [ input_node_id ] . name node = onnx . helper . make_node ( "Cast" , [ input_node ] , [ name ] , to = getattr ( onnx . TensorProto , dtype . upper ( ) ) , name = name , ) return [ node ]
short_docstring: Map MXNet's Cast operator attributes to onnx's Cast operator
  and return the created node.
short_docstring_tokens: Map MXNet ' s Cast operator attributes to onnx ' s Cast operator and return the created node .
comment: """Map MXNet's Cast operator attributes to onnx's Cast operator
      and return the created node.
      """$SEP$# dtype can be mapped only with types from TensorProto$SEP$# float32 is mapped to float and float64 to double in onnx$SEP$# following tensorproto mapping https://github.com/onnx/onnx/blob/master/onnx/mapping.py