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 __init__(self, vocab_size, **kwargs):
      super(BertPretrainLossAndMetricLayer, self).__init__(**kwargs)
      self._vocab_size = vocab_size
      self.config = {
          "vocab_size": vocab_size,
      }
  
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 1 to create a new BertPretrainLossAndMetricLayer object from inherited base classes: tf.keras.layers with example: obj = BertPretrainLossAndMetricLayer(vocab_size)