class_docstr: Returns layer that computes custom loss and metrics for pretraining.
class_docstr_tok: ["Returns","layer","that","computes","custom","loss","and","metrics","for","pretraining","."]
code: def __call__(
      self,
      lm_output,
      sentence_output=None,
      lm_label_ids=None,
      lm_label_weights=None,
      sentence_labels=None,
      **kwargs,
  ):
      inputs = tf_utils.pack_inputs(
          [
              lm_output,
              sentence_output,
              lm_label_ids,
              lm_label_weights,
              sentence_labels,
          ]
      )
      return super(BertPretrainLossAndMetricLayer, self).__call__(
          inputs, **kwargs
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tensorflow_hub
  from utils import tf_utils
  from utils.modeling import losses
  from utils.modeling import networks
  from utils.modeling.networks import bert_classifier
  from utils.modeling.networks import bert_pretrainer
  from utils.modeling.networks import bert_span_labeler
label_desc: Use image node_id 2 for calling the BertPretrainLossAndMetricLayer obj's underlying member method code with example usage: obj.__call__(lm_output, sentence_output, lm_label_ids, lm_label_weights, sentence_labels) and returns: super