parameters: (symbol, arg_params=None, aux_params=None)
return_statement: return sym, params
docstring: Convert from MXNet's model into compatible NNVM format.
  
      Parameters
      ----------
      symbol : mxnet.Symbol or mxnet.gluon.HybridBlock
          MXNet symbol
  
      arg_params : dict of str to mx.NDArray
          The argument parameters in mxnet
  
      aux_params : dict of str to mx.NDArray
          The auxiliary parameters in mxnet
  
      Returns
      -------
      sym : nnvm.Symbol
          Compatible nnvm symbol
  
      params : dict of str to tvm.NDArray
          The parameter dict to be used by nnvm
docstring_summary: Convert from MXNet's model into compatible NNVM format.
docstring_tokens: Convert from MXNet s model into compatible NNVM format .
function: def from_mxnet(symbol, arg_params=None, aux_params=None):
      """Convert from MXNet's model into compatible NNVM format.
  
      Parameters
      ----------
      symbol : mxnet.Symbol or mxnet.gluon.HybridBlock
          MXNet symbol
  
      arg_params : dict of str to mx.NDArray
          The argument parameters in mxnet
  
      aux_params : dict of str to mx.NDArray
          The auxiliary parameters in mxnet
  
      Returns
      -------
      sym : nnvm.Symbol
          Compatible nnvm symbol
  
      params : dict of str to tvm.NDArray
          The parameter dict to be used by nnvm
      """
      try:
          import mxnet as mx
      except ImportError as e:
          raise ImportError('{}. MXNet is required to parse symbols.'.format(e))
  
      if isinstance(symbol, mx.sym.Symbol):
          sym = _from_mxnet_impl(symbol, {})
          params = {}
          arg_params = arg_params if arg_params else {}
          aux_params = aux_params if aux_params else {}
          for k, v in arg_params.items():
              params[k] = tvm.nd.array(v.asnumpy())
          for k, v in aux_params.items():
              params[k] = tvm.nd.array(v.asnumpy())
      elif isinstance(symbol, mx.gluon.HybridBlock):
          data = mx.sym.Variable('data')
          sym = symbol(data)
          sym = _from_mxnet_impl(sym, {})
          params = {}
          for k, v in symbol.collect_params().items():
              params[k] = tvm.nd.array(v.data().asnumpy())
      elif isinstance(symbol, mx.gluon.Block):
          raise NotImplementedError("Only Hybrid Blocks are supported now.")
      else:
          msg = "mxnet.Symbol or gluon.HybridBlock expected, got {}".format(type(symbol))
          raise ValueError(msg)
      if isinstance(sym, list):
          sym = _sym.Group(sym)
      return sym, params
function_tokens: def from_mxnet ( symbol , arg_params = None , aux_params = None ) : try : import mxnet as mx except ImportError as e : raise ImportError ( '{}. MXNet is required to parse symbols.' . format ( e ) ) if isinstance ( symbol , mx . sym . Symbol ) : sym = _from_mxnet_impl ( symbol , { } ) params = { } arg_params = arg_params if arg_params else { } aux_params = aux_params if aux_params else { } for k , v in arg_params . items ( ) : params [ k ] = tvm . nd . array ( v . asnumpy ( ) ) for k , v in aux_params . items ( ) : params [ k ] = tvm . nd . array ( v . asnumpy ( ) ) elif isinstance ( symbol , mx . gluon . HybridBlock ) : data = mx . sym . Variable ( 'data' ) sym = symbol ( data ) sym = _from_mxnet_impl ( sym , { } ) params = { } for k , v in symbol . collect_params ( ) . items ( ) : params [ k ] = tvm . nd . array ( v . data ( ) . asnumpy ( ) ) elif isinstance ( symbol , mx . gluon . Block ) : raise NotImplementedError ( "Only Hybrid Blocks are supported now." ) else : msg = "mxnet.Symbol or gluon.HybridBlock expected, got {}" . format ( type ( symbol ) ) raise ValueError ( msg ) if isinstance ( sym , list ) : sym = _sym . Group ( sym ) return sym , params