class_docstr: Solver for raw tensorflow model.
class_docstr_tok: ["Solver","for","raw","tensorflow","model","."]
docstr: Do evaluation or inference once.
docstr_tok: ["Do","evaluation","or","inference","once","."]
code: def eval_or_infer_once(self, mode):
      """Do evaluation or inference once."""
      model = self.build(mode)
      model.sess = tf.Session(config=self.session_conf)
      model.saver = tf.train.Saver()
      self.eval_or_infer_core(model, mode)
      model.sess.close()
  
imports: import re
  import math
  import numpy
  import delta.compat
  from absl import logging
  from delta.utils.solver.base_solver import Solver
  from delta import utils
  from delta.utils.register import registers
  from delta.utils.solver.utils.solver_utils import get_checkpoint_dir
  from delta.utils.solver.utils.solver_utils import get_ckpt_state
  from delta.utils.solver.utils.solver_utils import get_session_conf
  from delta.utils.solver.utils.solver_utils import to_saved_model
  from delta.utils.solver.utils.solver_utils import run_metrics
label_desc: Use image node_id 16 for calling the RawSolver obj's underlying member method code with example usage: obj.eval_or_infer_once(mode) without return types