class_docstr: Solver for raw tensorflow model.
class_docstr_tok: ["Solver","for","raw","tensorflow","model","."]
docstr: Build the output of the model.
  `score` and `input_y` are for loss calculation.
  `preds` and `y_ground_truth` are for metric calculation.
docstr_tok: ["Build","the","output","of","the","model",".","`","score","`","and","`","input_y","`","are","for","loss","calculation",".","`","preds","`","and","`","y_ground_truth","`","are","for","metric","calculation","."]
code: def build_output(self, model):  # pylint: disable=no-self-use
      """
      Build the output of the model.
      `score` and `input_y` are for loss calculation.
      `preds` and `y_ground_truth` are for metric calculation.
      """
      if model.mode != utils.INFER:
          model.score = tf.nn.softmax(model.logits, name="score")
          model.preds = tf.argmax(model.logits, axis=-1)
          model.output_dict = {
              "score": model.score,
              "preds": model.preds,
          }
      else:
          model.preds = model.logits
          model.output_dict = {"preds": model.preds}
      if hasattr(model, "input_y"):
          model.y_ground_truth = model.input_y
  
file_path: delta/delta/utils/solver/raw_seq2seq_solver.py
imports: import math
  import numpy
  import delta.compat
  from absl import logging
  from delta import utils
  from delta.utils import metrics
  from delta.utils.register import registers
  from delta.utils.solver.raw_solver import RawSolver
label_desc: Use image node_id 1 for calling the RawS2SSolver obj's underlying member method code with example usage: obj.build_output(model) without return types