parameters: (
          model,
          shape={},
          frontend='keras',
          dtype=hcl.Float(),
          in_params=None)
return_statement: return hcl.build(s), _inputs
docstring: Parameters
      ----------
  
      model :
          A machine learning framework model
  
      shape : dict
          The model's input shape
  
      frontend : str
          The machine learning framework the model comes from
  
      dtype : heterocl type
          The model's preferred data type
  
      in_params :
          The input parameters of the model if not included in the model
function: def get_relay_model(
          model,
          shape={},
          frontend='keras',
          dtype=hcl.Float(),
          in_params=None):
      """
  
      Parameters
      ----------
  
      model :
          A machine learning framework model
  
      shape : dict
          The model's input shape
  
      frontend : str
          The machine learning framework the model comes from
  
      dtype : heterocl type
          The model's preferred data type
  
      in_params :
          The input parameters of the model if not included in the model
      """
      out_var, out_type, out_env, params = relay_parser(model, shape, frontend)
      out_var = full_flatten(out_var)
      _param = gen_params(out_type, out_env)
      v_param = [holder for holder in _param if ("_param" in holder.name)]
      v_input = [holder for holder in _param if ("input" in holder.name)]
      v_param.sort(
          key=lambda x: int(
              ''.join(
                  filter(
                      lambda i: i.isdigit(),
                      x.name))))
      v_input.sort(
          key=lambda x: int(
              ''.join(
                  filter(
                      lambda i: i.isdigit(),
                      x.name))))
      _param = partial_flatten([v_input, v_param])
      func = gen_func(_param, out_var, out_type, out_env)
      _inputs = []
      if params is None:
          params = in_params
      for var in params:
          _inputs.append(hcl.asarray(params[var].asnumpy()))
      s = hcl.create_schedule(_param, func)
      if debug_mode:
          print(hcl.lower(s))
      return hcl.build(s), _inputs
function_tokens: def get_relay_model ( model , shape = { } , frontend = 'keras' , dtype = hcl . Float ( ) , in_params = None ) : out_var , out_type , out_env , params = relay_parser ( model , shape , frontend ) out_var = full_flatten ( out_var ) _param = gen_params ( out_type , out_env ) v_param = [ holder for holder in _param if ( "_param" in holder . name ) ] v_input = [ holder for holder in _param if ( "input" in holder . name ) ] v_param . sort ( key = lambda x : int ( '' . join ( filter ( lambda i : i . isdigit ( ) , x . name ) ) ) ) v_input . sort ( key = lambda x : int ( '' . join ( filter ( lambda i : i . isdigit ( ) , x . name ) ) ) ) _param = partial_flatten ( [ v_input , v_param ] ) func = gen_func ( _param , out_var , out_type , out_env ) _inputs = [ ] if params is None : params = in_params for var in params : _inputs . append ( hcl . asarray ( params [ var ] . asnumpy ( ) ) ) s = hcl . create_schedule ( _param , func ) if debug_mode : print ( hcl . lower ( s ) ) return hcl . build ( s ) , _inputs