docstr: Return:
  
  Examples:
  
  ```python
  >>> from transformers import TFDPRQuestionEncoder, DPRQuestionEncoderTokenizer
  
  >>> tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-single-nq-base")
  >>> model = TFDPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-single-nq-base", from_pt=True)
  >>> input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="tf")["input_ids"]
  >>> embeddings = model(input_ids).pooler_output
  ```
docstr_tok: ["Return",":","Examples",":","``","`","python",">",">",">","from","transformers","import","TFDPRQuestionEncoder",",","DPRQuestionEncoderTokenizer",">",">",">","tokenizer","=","DPRQuestionEncoderTokenizer.from_pretrained","(","``","facebook\/dpr-question_encoder-single-nq-base","''",")",">",">",">","model","=","TFDPRQuestionEncoder.from_pretrained","(","``","facebook\/dpr-question_encoder-single-nq-base","''",",","from_pt=True",")",">",">",">","input_ids","=","tokenizer","(","``","Hello",",","is","my","dog","cute","?","``",",","return_tensors=","''","tf","''",")","[","``","input_ids","''","]",">",">",">","embeddings","=","model","(","input_ids",")",".pooler_output","``","`"]
code: def call(
      self,
      input_ids: TFModelInputType | None = None,
      attention_mask: tf.Tensor | None = None,
      token_type_ids: tf.Tensor | None = None,
      inputs_embeds: tf.Tensor | None = None,
      output_attentions: bool | None = None,
      output_hidden_states: bool | None = None,
      return_dict: bool | None = None,
      training: bool = False,
  ) -> TFDPRQuestionEncoderOutput | Tuple[tf.Tensor, ...]:
      r"""
      Return:
  
      Examples:
  
      ```python
      >>> from transformers import TFDPRQuestionEncoder, DPRQuestionEncoderTokenizer
  
      >>> tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-single-nq-base")
      >>> model = TFDPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-single-nq-base", from_pt=True)
      >>> input_ids = tokenizer("Hello, is my dog cute ?", return_tensors="tf")["input_ids"]
      >>> embeddings = model(input_ids).pooler_output
      ```
      """
      if input_ids is not None and inputs_embeds is not None:
          raise ValueError(
              "You cannot specify both input_ids and inputs_embeds at the same time"
          )
      elif input_ids is not None:
          input_shape = shape_list(input_ids)
      elif inputs_embeds is not None:
          input_shape = shape_list(inputs_embeds)[:-1]
      else:
          raise ValueError(
              "You have to specify either input_ids or inputs_embeds"
          )
  
      if attention_mask is None:
          attention_mask = (
              tf.ones(input_shape, dtype=tf.dtypes.int32)
              if input_ids is None
              else (input_ids != self.config.pad_token_id)
          )
      if token_type_ids is None:
          token_type_ids = tf.zeros(input_shape, dtype=tf.dtypes.int32)
  
      outputs = self.question_encoder(
          input_ids=input_ids,
          attention_mask=attention_mask,
          token_type_ids=token_type_ids,
          inputs_embeds=inputs_embeds,
          output_attentions=output_attentions,
          output_hidden_states=output_hidden_states,
          return_dict=return_dict,
          training=training,
      )
  
      if not return_dict:
          return outputs[1:]
      return TFDPRQuestionEncoderOutput(
          pooler_output=outputs.pooler_output,
          hidden_states=outputs.hidden_states,
          attentions=outputs.attentions,
      )
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Tuple, Union
  import tensorflow
  from ...modeling_tf_outputs import TFBaseModelOutputWithPooling
  from ...modeling_tf_utils import TFModelInputType, TFPreTrainedModel, get_initializer, shape_list, unpack_inputs
  from ...utils import ModelOutput, add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from ..bert.modeling_tf_bert import TFBertMainLayer
  from .configuration_dpr import DPRConfig
label_desc: Use image node_id 3 for calling the TFDPRQuestionEncoder obj's underlying member method code with example usage: obj.call(input_ids, attention_mask, token_type_ids, inputs_embeds, output_attentions, output_hidden_states, return_dict, training) and returns: TFDPRQuestionEncoderOutput, outputs