class_docstr: Solver for NLU joint model.
docstr: Build the output of the model for export.
  `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","for","export",".","`","score","`","and","`","input_y","`","are","for","loss","calculation",".","`","preds","`","and","`","y_ground_truth","`","are","for","metric","calculation","."]
code: def build_export_output(self, model):  # pylint: disable=no-self-use
      """
      Build the output of the model for export.
      `score` and `input_y` are for loss calculation.
      `preds` and `y_ground_truth` are for metric calculation.
      """
      transitions = model.transitions
      intent_logits, slots_logits = model.logits
  
      intent_score = tf.nn.softmax(intent_logits, name="intent_score")
      intent_preds = tf.argmax(
          intent_logits, axis=-1, name="intent_preds"
      )
  
      slots_preds, slots_score = crf_decode(
          slots_logits, transitions, model.input_x_len
      )
  
      slots_preds = tf.identity(slots_preds, name="slots_preds")
      slots_score = tf.identity(slots_score, name="slots_score")
  
      model.preds = intent_preds, slots_preds
      model.score = intent_score, slots_score
      model.output_dict = {
          "slots_score": slots_score,
          "slots_preds": slots_preds,
          "intent_score": intent_score,
          "intent_preds": intent_preds,
      }
      logging.info("Model built.")
  
file_path: delta/delta/utils/solver/raw_nlu_joint_solver.py
imports: from absl import logging
  import delta.compat
  from tensorflow_addons.text import crf_decode
  from delta.utils.register import registers
  from delta.utils.solver.raw_solver import RawSolver
label_desc: Use image node_id 2 for calling the RawNLUJointSolver obj's underlying member method code with example usage: obj.build_export_output(model) without return types