def call(self, input_features=None, decoder_input_ids=None, decoder_attention_mask=None, decoder_position_ids=None, head_mask=None, decoder_head_mask=None, cross_attn_head_mask=None, encoder_outputs=None, past_key_values=None, decoder_inputs_embeds=None, use_cache=None, output_attentions=None, output_hidden_states=None, return_dict=None, training=False):
    output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
    output_hidden_states = output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
    use_cache = use_cache if use_cache is not None else self.config.use_cache
    return_dict = return_dict if return_dict is not None else self.config.use_return_dict
    if encoder_outputs is None:
        encoder_outputs = self.encoder(input_features, head_mask=head_mask, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict, training=training)
    elif return_dict and (not isinstance(encoder_outputs, TFBaseModelOutput)):
        encoder_outputs = TFBaseModelOutput(last_hidden_state=encoder_outputs[0], hidden_states=encoder_outputs[1] if len(encoder_outputs) > 1 else None, attentions=encoder_outputs[2] if len(encoder_outputs) > 2 else None)
    decoder_outputs = self.decoder(input_ids=decoder_input_ids, attention_mask=decoder_attention_mask, position_ids=decoder_position_ids, encoder_hidden_states=encoder_outputs[0], head_mask=decoder_head_mask, cross_attn_head_mask=cross_attn_head_mask, past_key_values=past_key_values, inputs_embeds=decoder_inputs_embeds, use_cache=use_cache, output_attentions=output_attentions, output_hidden_states=output_hidden_states, return_dict=return_dict, training=training)
    if not return_dict:
        return decoder_outputs + encoder_outputs
    return TFSeq2SeqModelOutput(last_hidden_state=decoder_outputs.last_hidden_state, past_key_values=decoder_outputs.past_key_values, decoder_hidden_states=decoder_outputs.hidden_states, decoder_attentions=decoder_outputs.attentions, cross_attentions=decoder_outputs.cross_attentions, encoder_last_hidden_state=encoder_outputs.last_hidden_state, encoder_hidden_states=encoder_outputs.hidden_states, encoder_attentions=encoder_outputs.attentions)

Returns:

Example:

 ```python
 >>> import tensorflow as tf
 >>> from transformers import TFWhisperModel, AutoFeatureExtractor
 >>> from datasets import load_dataset

 >>> model = TFWhisperModel.from_pretrained("openai/whisper-base")
 >>> feature_extractor = AutoFeatureExtractor.from_pretrained("openai/whisper-base")
 >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
 >>> inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="tf")
 >>> input_features = inputs.input_features
 >>> decoder_input_ids = tf.convert_to_tensor([[1, 1]]) * model.config.decoder_start_token_id
 >>> last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
 >>> list(last_hidden_state.shape)
 [1, 2, 512]
 ```


def _check_signature_compatible(method_signature, base_signature, stack, matcher, ctx):

    def is_subtype(this_type, that_type):
        """Return True iff this_type is a subclass of that_type."""
        if this_type == ctx.convert.never:
            return True
        this_type_instance = this_type.instantiate(ctx.root_node, container=abstract_utils.DUMMY_CONTAINER)
        return matcher.compute_one_match(this_type_instance, that_type).success
    check_result = _check_positional_parameters(method_signature, base_signature, is_subtype, ctx) or _check_keyword_only_parameters(method_signature, base_signature, is_subtype) or _check_default_values(method_signature, base_signature) or _check_return_types(method_signature, base_signature, is_subtype)
    if check_result:
        ctx.errorlog.overriding_signature_mismatch(stack, base_signature, method_signature, details=check_result.message)

Checks if the signatures match for the overridden and overriding methods.

Adds the first error found to the context's error log.

Two invariants are verified:
1. Every call that is valid for the overridden method is valid for
   the overriding method.
2. Two calls that are equivalent for the overridden method are equivalent
   for the overriding method.

This translates into the following mapping requirements for
overriding method parameters:
+----------------------------------------------------------------------------+
| Overridden method                    | Overriding method                   |
+----------------------------------------------------------------------------+
| Positional-only                      | Positional-only or                  |
|                                      | positional-or-keyword, any name     |
+--------------------------------------+-------------------------------------+
| Positional-or-keyword                | Positional-or-keyword, same name    |
+--------------------------------------+-------------------------------------+
| Keyword-only                         | Positional-or-keyword               |
|                                      | or keyword-only, same name          |
+--------------------------------------+-------------------------------------+
| Non-default                          | Non-default or default              |
+--------------------------------------+-------------------------------------+
| Default                              | Default, same default value         |
+--------------------------------------+-------------------------------------+
| Parameter of type T                  | Parameter of supertype of T or      |
|                                      | no annotation                       |
+--------------------------------------+-------------------------------------+
| Parameter without annotation         | Parameter with any type annotation  |
|                                      | or without annotation               |
+--------------------------------------+-------------------------------------+
| Return type T                        | Return type - subtype of T or       |
|                                      | no annotation                       |
+--------------------------------------+-------------------------------------+
| Return type not annotated            | Any return type annotation          |
|                                      | or no annotation                    |
+--------------------------------------+-------------------------------------+
In addition, default parameters of the overriding method don't have to match
any parameters of the overridden method.
Same name requirement is often violated, so we don't treat is as an error
for now and only log a warning.

Arguments:
  method_signature: signature of the overriding method.
  base_signature: signature of the overridden method.
  stack: the stack to use for mismatch error reporting.
  matcher: abstract matcher for type comparison.
  ctx: pytype abstract context.


def report_build(config, auth, account, body):
    report = report_get(config, auth, account, name=body['name'])
    if report is None:
        account_id, advertiser_ids = parse_account(config, auth, account)
        is_superuser, profile_id = get_profile_for_api(config, auth, account_id)
        body['accountId'] = account_id
        body['ownerProfileId'] = profile_id
        if advertiser_ids and 'criteria' in body:
            body['criteria']['dimensionFilters'] = body.get('criteria', {}).get('dimensionFilters', []) + [{'kind': 'dfareporting#dimensionValue', 'dimensionName': 'advertiser', 'id': advertiser_id, 'matchType': 'EXACT'} for advertiser_id in advertiser_ids]
        if 'schedule' not in body:
            body['schedule'] = {'active': True, 'repeats': 'DAILY', 'every': 1}
        if 'startDate' not in body['schedule']:
            body['schedule']['startDate'] = str(date.today())
        if 'expirationDate' not in body['schedule']:
            body['schedule']['expirationDate'] = str(date.today() + timedelta(days=365))
        kwargs = {'profileId': profile_id, 'accountId': account_id} if is_superuser else {'profileId': profile_id}
        kwargs['body'] = body
        report = API_DCM(config, auth, internal=is_superuser).reports().insert(**kwargs).execute()
        kwargs = {'profileId': profile_id, 'accountId': account_id} if is_superuser else {'profileId': profile_id}
        kwargs['reportId'] = report['id']
        API_DCM(config, auth, internal=is_superuser).reports().run(**kwargs).execute()
    elif config.verbose:
        print('DCM Report Exists:', body['name'])
    return report

Creates a DCM report given a JSON definition.

Bulletproofing:
https://developers.google.com/doubleclick-advertisers/v3.2/reports/insert

The body JSON provided will have the following fields overriden:
  * accountId - supplied as a parameter in account token.
  * ownerProfileId - determined from the current credentials.
  * advertiser_ids - supplied as a parameter in account token.

Args:
  * auth: (string) Either user or service.
  * account: (string) [account:advertiser@profile] token.
  * body: (json) As defined in:
    https://developers.google.com/doubleclick-advertisers/v3.2/reports#resource

Returns:
  * JSON definition of report created or existing.


def _show_tag_sets(saved_model_dir):
    tag_sets = saved_model_utils.get_saved_model_tag_sets(saved_model_dir)
    print('The given SavedModel contains the following tag-sets:')
    for tag_set in sorted(tag_sets):
        print('%r' % ', '.join(sorted(tag_set)))

Prints the tag-sets stored in SavedModel directory.

Prints all the tag-sets for MetaGraphs stored in SavedModel directory.

Args:
  saved_model_dir: Directory containing the SavedModel to inspect.


def __init__(self, data=None, _KEY=None, _ATTRS=None):
    if self.__class__ is MapEntry:
        raise TypeError('MapEntry is an abstract class.')
    if data is None:
        return
    else:
        for key in data:
            setattr(self, key, data[key])
    self.log = logging.getLogger(__name__)

This is an abstract class.

Args:
  data:  An optional dict of attribute, value pairs to populate with.

Raises:
  TypeError:  Bad argument, or attempt to instantiate abstract class.


def log_softmax(x, axis=-1):
    return ops.log_softmax(x, axis=axis)

Log-Softmax activation function.

Each input vector is handled independently.
The `axis` argument sets which axis of the input the function
is applied along.

Args:
    x: Input tensor.
    axis: Integer, axis along which the softmax is applied.