def bert_scl_post_process(outputs) -> torch.Tensor:
    """Post-processing for Sequence Classification tasks."""
    if isinstance(outputs, torch.Tensor):
        return outputs.argmax(dim=-1)
    if isinstance(outputs, (OrderedDict, dict)):
        if "logits" in outputs:
            return outputs["logits"].argmax(dim=-1)
        if "last_hidden_state" in outputs:
            return outputs["last_hidden_state"]
    raise ValueError(f"Unsupported output type: {type(outputs)}")
Post-processing for Sequence Classification tasks.
examples/bert/qnn/google_bert_qnn.py