@add_start_docstrings_to_model_forward(CONVBERT_INPUTS_DOCSTRING.format('batch_size, sequence_length'))
@add_code_sample_docstrings(processor_class=_TOKENIZER_FOR_DOC, checkpoint=_CHECKPOINT_FOR_DOC, output_type=TFQuestionAnsweringModelOutput, config_class=_CONFIG_FOR_DOC)
def call(self, input_ids=None, attention_mask=None, token_type_ids=None, position_ids=None, head_mask=None, inputs_embeds=None, output_attentions=None, output_hidden_states=None, return_dict=None, start_positions=None, end_positions=None, training=False, **kwargs):
    '\n        start_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):\n            Labels for position (index) of the start of the labelled span for computing the token classification loss.\n            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence\n            are not taken into account for computing the loss.\n        end_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):\n            Labels for position (index) of the end of the labelled span for computing the token classification loss.\n            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence\n            are not taken into account for computing the loss.\n        '
    inputs = input_processing(func=self.call, config=self.config, input_ids=input_ids, attention_mask=attention_mask, token_type_ids=token_type_ids, position_ids=position_ids, head_mask=head_mask, inputs_embeds=inputs_embeds, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict, start_positions=start_positions, end_positions=end_positions, training=training, kwargs_call=kwargs)
    outputs = self.convbert(inputs['input_ids'], attention_mask=inputs['attention_mask'], token_type_ids=inputs['token_type_ids'], position_ids=inputs['position_ids'], head_mask=inputs['head_mask'], inputs_embeds=inputs['inputs_embeds'], output_attentions=inputs['output_attentions'], output_hidden_states=inputs['output_hidden_states'], return_dict=inputs['return_dict'], training=inputs['training'])
    sequence_output = outputs[0]
    logits = self.qa_outputs(sequence_output)
    (start_logits, end_logits) = tf.split(logits, 2, axis=(- 1))
    start_logits = tf.squeeze(start_logits, axis=(- 1))
    end_logits = tf.squeeze(end_logits, axis=(- 1))
    loss = None
    if ((inputs['start_positions'] is not None) and (inputs['end_positions'] is not None)):
        labels = {'start_position': inputs['start_positions']}
        labels['end_position'] = inputs['end_positions']
        loss = self.compute_loss(labels, (start_logits, end_logits))
    if (not inputs['return_dict']):
        output = ((start_logits, end_logits) + outputs[1:])
        return (((loss,) + output) if (loss is not None) else output)
    return TFQuestionAnsweringModelOutput(loss=loss, start_logits=start_logits, end_logits=end_logits, hidden_states=outputs.hidden_states, attentions=outputs.attentions)
start_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):
    Labels for position (index) of the start of the labelled span for computing the token classification loss.
    Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
    are not taken into account for computing the loss.
end_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):
    Labels for position (index) of the end of the labelled span for computing the token classification loss.
    Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
    are not taken into account for computing the loss.
@add_start_docstrings_to_model_forward(CONVBERT_INPUTS_DOCSTRING.format('batch_size, sequence_length'))
@add_code_sample_docstrings(processor_class=_TOKENIZER_FOR_DOC, checkpoint=_CHECKPOINT_FOR_DOC, output_type=TFQuestionAnsweringModelOutput, config_class=_CONFIG_FOR_DOC)
def call(self, input_ids=None, attention_mask=None, token_type_ids=None, position_ids=None, head_mask=None, inputs_embeds=None, output_attentions=None, output_hidden_states=None, return_dict=None, start_positions=None, end_positions=None, training=False, **kwargs):
    '\n        start_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):\n            Labels for position (index) of the start of the labelled span for computing the token classification loss.\n            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence\n            are not taken into account for computing the loss.\n        end_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):\n            Labels for position (index) of the end of the labelled span for computing the token classification loss.\n            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence\n            are not taken into account for computing the loss.\n        '
    inputs = input_processing(func=self.call, config=self.config, input_ids=input_ids, attention_mask=attention_mask, token_type_ids=token_type_ids, position_ids=position_ids, head_mask=head_mask, inputs_embeds=inputs_embeds, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict, start_positions=start_positions, end_positions=end_positions, training=training, kwargs_call=kwargs)
    outputs = self.convbert(inputs['input_ids'], attention_mask=inputs['attention_mask'], token_type_ids=inputs['token_type_ids'], position_ids=inputs['position_ids'], head_mask=inputs['head_mask'], inputs_embeds=inputs['inputs_embeds'], output_attentions=inputs['output_attentions'], output_hidden_states=inputs['output_hidden_states'], return_dict=inputs['return_dict'], training=inputs['training'])
    sequence_output = outputs[0]
    logits = self.qa_outputs(sequence_output)
    (start_logits, end_logits) = tf.split(logits, 2, axis=(- 1))
    start_logits = tf.squeeze(start_logits, axis=(- 1))
    end_logits = tf.squeeze(end_logits, axis=(- 1))
    loss = None
    if ((inputs['start_positions'] is not None) and (inputs['end_positions'] is not None)):
        labels = {'start_position': inputs['start_positions']}
        labels['end_position'] = inputs['end_positions']
        loss = self.compute_loss(labels, (start_logits, end_logits))
    if (not inputs['return_dict']):
        output = ((start_logits, end_logits) + outputs[1:])
        return (((loss,) + output) if (loss is not None) else output)
    return TFQuestionAnsweringModelOutput(loss=loss, start_logits=start_logits, end_logits=end_logits, hidden_states=outputs.hidden_states, attentions=outputs.attentions)