class_docstr: An abstract interface for executing Relay programs.
class_docstr_tok: ["An","abstract","interface","for","executing","Relay","programs","."]
docstr: Evaluate a Relay expression on the executor.
  
  Parameters
  ----------
  expr: Optional[tvm.relay.Expr]
      The expression to evaluate.
  
  binds: Optional[Map[tvm.relay.Var, tvm.relay.Expr]]
      Additional binding of free variable.
  
  Returns
  -------
  val : Union[function, Object]
      The evaluation result.
docstr_tok: ["Evaluate","a","Relay","expression","on","the","executor",".","Parameters","--","--","--","--","--","expr",":","Optional","[","tvm.relay.Expr","]","The","expression","to","evaluate",".","binds",":","Optional","[","Map","[","tvm.relay.Var",",","tvm.relay.Expr","]","]","Additional","binding","of","free","variable",".","Returns","--","--","--","-","val",":","Union","[","function",",","Object","]","The","evaluation","result","."]
code: def evaluate(self, expr=None, binds=None):
      """
      Evaluate a Relay expression on the executor.
  
      Parameters
      ----------
      expr: Optional[tvm.relay.Expr]
          The expression to evaluate.
  
      binds: Optional[Map[tvm.relay.Var, tvm.relay.Expr]]
          Additional binding of free variable.
  
      Returns
      -------
      val : Union[function, Object]
          The evaluation result.
      """
      if binds:
          scope_builder = ScopeBuilder()
          for key, value in binds.items():
              scope_builder.let(key, _arg_to_ast(self.mod, value))
          scope_builder.ret(expr)
          expr = scope_builder.get()
  
      if not expr:
          return self._make_executor()
  
      if isinstance(expr, Function):
          assert not analysis.free_vars(expr)
  
      if isinstance(expr, (Function, GlobalVar)):
          return self._make_executor(expr)
  
      # normal expression evaluated by running a function.
      # TODO(mbs): This should really be type rather than syntax driven.
      func = Function([], expr)
      return self._make_executor(func)()
  
imports: from __future__ import absolute_import
  import numpy
  import tvm._ffi
  from tvm.runtime import container, Object
  from .None import _backend
  from ..None import _make, analysis
  from ...None import nd
  from ..expr import Tuple, RefCreate, Call, Constant, GlobalVar, const
  from ..function import Function
  from ..scope_builder import ScopeBuilder
label_desc: Use image node_id 3 for calling the Executor obj's underlying member method code with example usage: obj.evaluate(expr, binds) and returns: self, self, self