class_docstr: Solver in Keras way.
class_docstr_tok: ["Solver","in","Keras","way","."]
docstr: Make a inference.
docstr_tok: ["Make","a","inference","."]
code: def infer(
      self, **kwargs
  ):  # pylint: disable=arguments-differ, unused-argument
      """Make a inference."""
      inputs = self.build_inputs(utils.INFER)
      self.build()
      self.session.run(tf.global_variables_initializer())
      self.session.run(tf.tables_initializer())
      self.session.run(inputs.iterator.initializer)
      infer_data_size = self.config["data"]["infer_data_size"]
      batch_size = self.config["data"]["task"]["batch_size"]
      steps = int(math.ceil(infer_data_size / batch_size))
      weights_ckpt_dir = tf.train.latest_checkpoint(self.checkpoint_dir)
      self.model.load_weights(weights_ckpt_dir)
      logits = self.model.predict(inputs.input_x_dict, steps=steps)
      preds = np.argmax(logits, axis=-1)
      save_infer_res(self.config, logits, preds)
  
imports: import os
  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_session_conf
  from delta.utils.solver.utils.solver_utils import to_saved_model
  from delta.utils.solver.utils.solver_utils import save_infer_res
label_desc: Use image node_id 11 for calling the KerasSolver obj's underlying member method code with example usage: obj.infer() without return types