

import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
    import torch

    from transformers import (
        RemBertConfig,
        RemBertForCausalLM,
        RemBertForMaskedLM,
        RemBertForMultipleChoice,
        RemBertForQuestionAnswering,
        RemBertForSequenceClassification,
        RemBertForTokenClassification,
        RemBertModel,
    )
    from transformers.models.rembert.modeling_rembert import REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST

class 						__snake_case						:
       """simple docstring"""







       def __init__(		self			,   _UpperCamelCase			,   _UpperCamelCase=13			,   _UpperCamelCase=7			,   _UpperCamelCase=True			,   _UpperCamelCase=True			,   _UpperCamelCase=True			,   _UpperCamelCase=True			,   _UpperCamelCase=99			,   _UpperCamelCase=32			,   _UpperCamelCase=18			,   _UpperCamelCase=43			,   _UpperCamelCase=5			,   _UpperCamelCase=4			,   _UpperCamelCase=37			,   _UpperCamelCase="gelu"			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.1			,   _UpperCamelCase=5_12			,   _UpperCamelCase=16			,   _UpperCamelCase=2			,   _UpperCamelCase=0.02			,   _UpperCamelCase=3			,   _UpperCamelCase=4			,   _UpperCamelCase=None			,   )			->       List[str]:






              """simple docstring"""


              __snake_case					  =       parent
              __snake_case					  =       batch_size
              __snake_case					  =       seq_length
              __snake_case					  =       is_training
              __snake_case					  =       use_input_mask
              __snake_case					  =       use_token_type_ids
              __snake_case					  =       use_labels
              __snake_case					  =       vocab_size
              __snake_case					  =       hidden_size
              __snake_case					  =       input_embedding_size
              __snake_case					  =       output_embedding_size
              __snake_case					  =       num_hidden_layers
              __snake_case					  =       num_attention_heads
              __snake_case					  =       intermediate_size
              __snake_case					  =       hidden_act
              __snake_case					  =       hidden_dropout_prob
              __snake_case					  =       attention_probs_dropout_prob
              __snake_case					  =       max_position_embeddings
              __snake_case					  =       type_vocab_size
              __snake_case					  =       type_sequence_label_size
              __snake_case					  =       initializer_range
              __snake_case					  =       num_labels
              __snake_case					  =       num_choices
              __snake_case					  =       scope


       def  a		(		self      )			->       Union[str, Any]:






              """simple docstring"""


              __snake_case					  =       ids_tensor([self.batch_size, self.seq_length]			,   self.vocab_size      )

              __snake_case					  =       None
              if self.use_input_mask:
                     __snake_case					  =       random_attention_mask([self.batch_size, self.seq_length]      )

              __snake_case					  =       None
              if self.use_token_type_ids:
                     __snake_case					  =       ids_tensor([self.batch_size, self.seq_length]			,   self.type_vocab_size      )

              __snake_case					  =       None
              __snake_case					  =       None
              __snake_case					  =       None
              if self.use_labels:
                     __snake_case					  =       ids_tensor([self.batch_size]			,   self.type_sequence_label_size      )
                     __snake_case					  =       ids_tensor([self.batch_size, self.seq_length]			,   self.num_labels      )
                     __snake_case					  =       ids_tensor([self.batch_size]			,   self.num_choices      )

              __snake_case					  =       RemBertConfig(
                  vocab_size=self.vocab_size			,   hidden_size=self.hidden_size			,   input_embedding_size=self.input_embedding_size			,   output_embedding_size=self.output_embedding_size			,   num_hidden_layers=self.num_hidden_layers			,   num_attention_heads=self.num_attention_heads			,   intermediate_size=self.intermediate_size			,   hidden_act=self.hidden_act			,   hidden_dropout_prob=self.hidden_dropout_prob			,   attention_probs_dropout_prob=self.attention_probs_dropout_prob			,   max_position_embeddings=self.max_position_embeddings			,   type_vocab_size=self.type_vocab_size			,   is_decoder=_UpperCamelCase			,   initializer_range=self.initializer_range			,   )

              return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels


       def  a		(		self      )			->       Any:






              """simple docstring"""


              (
                  (
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						
              )					  =       self.prepare_config_and_inputs()

              __snake_case					  =       True
              __snake_case					  =       floats_tensor([self.batch_size, self.seq_length, self.hidden_size]      )
              __snake_case					  =       ids_tensor([self.batch_size, self.seq_length]			,   vocab_size=2      )

              return (
                  config,
                  input_ids,
                  token_type_ids,
                  input_mask,
                  sequence_labels,
                  token_labels,
                  choice_labels,
                  encoder_hidden_states,
                  encoder_attention_mask,
              )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       str:






              """simple docstring"""


              __snake_case					  =       RemBertModel(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase      )
              __snake_case					  =       model(_UpperCamelCase			,   token_type_ids=_UpperCamelCase      )
              __snake_case					  =       model(_UpperCamelCase      )
              self.parent.assertEqual(result.last_hidden_state.shape			,   (self.batch_size, self.seq_length, self.hidden_size)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   )			->       Union[str, Any]:






              """simple docstring"""


              __snake_case					  =       True
              __snake_case					  =       RemBertModel(_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   encoder_hidden_states=_UpperCamelCase			,   encoder_attention_mask=_UpperCamelCase			,   )
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   encoder_hidden_states=_UpperCamelCase			,   )
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase      )
              self.parent.assertEqual(result.last_hidden_state.shape			,   (self.batch_size, self.seq_length, self.hidden_size)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   )			->       int:






              """simple docstring"""


              __snake_case					  =       RemBertForCausalLM(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   labels=_UpperCamelCase      )
              self.parent.assertEqual(result.logits.shape			,   (self.batch_size, self.seq_length, self.vocab_size)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       Any:






              """simple docstring"""


              __snake_case					  =       RemBertForMaskedLM(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   labels=_UpperCamelCase      )
              self.parent.assertEqual(result.logits.shape			,   (self.batch_size, self.seq_length, self.vocab_size)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   )			->       Tuple:






              """simple docstring"""


              __snake_case					  =       True
              __snake_case					  =       True
              __snake_case					  =       RemBertForCausalLM(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()

              # first forward pass
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   encoder_hidden_states=_UpperCamelCase			,   encoder_attention_mask=_UpperCamelCase			,   use_cache=_UpperCamelCase			,   )
              __snake_case					  =       outputs.past_key_values

              # create hypothetical multiple next token and extent to next_input_ids
              __snake_case					  =       ids_tensor((self.batch_size, 3)			,   config.vocab_size      )
              __snake_case					  =       ids_tensor((self.batch_size, 3)			,   vocab_size=2      )

              # append to next input_ids and
              __snake_case					  =       torch.cat([input_ids, next_tokens]			,   dim=-1      )
              __snake_case					  =       torch.cat([input_mask, next_mask]			,   dim=-1      )

              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   encoder_hidden_states=_UpperCamelCase			,   encoder_attention_mask=_UpperCamelCase			,   output_hidden_states=_UpperCamelCase			,   )["""hidden_states"""][0]
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   encoder_hidden_states=_UpperCamelCase			,   encoder_attention_mask=_UpperCamelCase			,   past_key_values=_UpperCamelCase			,   output_hidden_states=_UpperCamelCase			,   )["""hidden_states"""][0]

              # select random slice
              __snake_case					  =       ids_tensor((1,)			,   output_from_past.shape[-1]      ).item()
              __snake_case					  =       output_from_no_past[:, -3:, random_slice_idx].detach()
              __snake_case					  =       output_from_past[:, :, random_slice_idx].detach()

              self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]      )

              # test that outputs are equal for slice
              self.parent.assertTrue(torch.allclose(_UpperCamelCase			,   _UpperCamelCase			,   atol=1E-3      )      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       str:






              """simple docstring"""


              __snake_case					  =       RemBertForQuestionAnswering(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   start_positions=_UpperCamelCase			,   end_positions=_UpperCamelCase			,   )
              self.parent.assertEqual(result.start_logits.shape			,   (self.batch_size, self.seq_length)      )
              self.parent.assertEqual(result.end_logits.shape			,   (self.batch_size, self.seq_length)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       Optional[int]:






              """simple docstring"""


              __snake_case					  =       self.num_labels
              __snake_case					  =       RemBertForSequenceClassification(_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   labels=_UpperCamelCase      )
              self.parent.assertEqual(result.logits.shape			,   (self.batch_size, self.num_labels)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       Dict:






              """simple docstring"""


              __snake_case					  =       self.num_labels
              __snake_case					  =       RemBertForTokenClassification(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       model(_UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   labels=_UpperCamelCase      )
              self.parent.assertEqual(result.logits.shape			,   (self.batch_size, self.seq_length, self.num_labels)      )


       def  a		(		self			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase      )			->       Any:






              """simple docstring"""


              __snake_case					  =       self.num_choices
              __snake_case					  =       RemBertForMultipleChoice(config=_UpperCamelCase      )
              model.to(_UpperCamelCase      )
              model.eval()
              __snake_case					  =       input_ids.unsqueeze(1      ).expand(-1			,   self.num_choices			,   -1      ).contiguous()
              __snake_case					  =       token_type_ids.unsqueeze(1      ).expand(-1			,   self.num_choices			,   -1      ).contiguous()
              __snake_case					  =       input_mask.unsqueeze(1      ).expand(-1			,   self.num_choices			,   -1      ).contiguous()
              __snake_case					  =       model(
                  _UpperCamelCase			,   attention_mask=_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   labels=_UpperCamelCase			,   )
              self.parent.assertEqual(result.logits.shape			,   (self.batch_size, self.num_choices)      )






       def  a		(		self      )			->       Tuple:






              """simple docstring"""


              __snake_case					  =       self.prepare_config_and_inputs()
              (
                  (
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						
              )					  =       config_and_inputs
              __snake_case					  =       {"""input_ids""": input_ids, """token_type_ids""": token_type_ids, """attention_mask""": input_mask}
              return config, inputs_dict






@require_torch
class 						__snake_case						(							snake_case__ ,  snake_case__ ,  unittest.TestCase     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       (
           (
               RemBertModel,
               RemBertForMaskedLM,
               RemBertForCausalLM,
               RemBertForMultipleChoice,
               RemBertForQuestionAnswering,
               RemBertForSequenceClassification,
               RemBertForTokenClassification,
           )
           if is_torch_available()
           else ()
       )
       __SCREAMING_SNAKE_CASE													=       (RemBertForCausalLM,) if is_torch_available() else ()
       __SCREAMING_SNAKE_CASE													=       (
           {
               "feature-extraction": RemBertModel,
               "fill-mask": RemBertForMaskedLM,
               "question-answering": RemBertForQuestionAnswering,
               "text-classification": RemBertForSequenceClassification,
               "text-generation": RemBertForCausalLM,
               "token-classification": RemBertForTokenClassification,
               "zero-shot": RemBertForSequenceClassification,
           }
           if is_torch_available()
           else {}
       )


       def  a		(		self      )			->       int:






              """simple docstring"""


              __snake_case					  =       RemBertModelTester(self      )
              __snake_case					  =       ConfigTester(self			,   config_class=_UpperCamelCase			,   hidden_size=37      )


       def  a		(		self      )			->       Dict:






              """simple docstring"""


              self.config_tester.run_common_tests()


       def  a		(		self      )			->       Optional[int]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_model(*_UpperCamelCase      )


       def  a		(		self      )			->       List[Any]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              for type in ["absolute", "relative_key", "relative_key_query"]:
                     __snake_case					  =       type
                     self.model_tester.create_and_check_model(*_UpperCamelCase      )


       def  a		(		self      )			->       Any:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_for_masked_lm(*_UpperCamelCase      )


       def  a		(		self      )			->       List[str]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_for_multiple_choice(*_UpperCamelCase      )


       def  a		(		self      )			->       List[str]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs_for_decoder()
              self.model_tester.create_and_check_decoder_model_past_large_inputs(*_UpperCamelCase      )


       def  a		(		self      )			->       int:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_for_question_answering(*_UpperCamelCase      )


       def  a		(		self      )			->       Optional[int]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_for_sequence_classification(*_UpperCamelCase      )


       def  a		(		self      )			->       str:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_for_token_classification(*_UpperCamelCase      )


       def  a		(		self      )			->       List[Any]:






              """simple docstring"""


              __snake_case					  =       self.model_tester.prepare_config_and_inputs_for_decoder()
              self.model_tester.create_and_check_model_as_decoder(*_UpperCamelCase      )


       def  a		(		self      )			->       List[str]:






              """simple docstring"""


              (
                  (
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						(
                  __snake_case
              )  ,						
              )					  =       self.model_tester.prepare_config_and_inputs_for_decoder()

              __snake_case					  =       None

              self.model_tester.create_and_check_model_as_decoder(
                  _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   _UpperCamelCase			,   )






       @slow
       def  a		(		self      )			->       List[str]:






              """simple docstring"""


              for model_name in REMBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                     __snake_case					  =       RemBertModel.from_pretrained(_UpperCamelCase      )
                     self.assertIsNotNone(_UpperCamelCase      )






@require_torch
class 						__snake_case						(							unittest.TestCase     ):
       """simple docstring"""







       @slow
       def  a		(		self      )			->       Optional[Any]:






              """simple docstring"""


              __snake_case					  =       RemBertModel.from_pretrained("""google/rembert"""      )
              __snake_case					  =       torch.tensor([[3_12, 5_64_98, 3_13, 21_25, 3_13]]      )
              __snake_case					  =       torch.tensor([[0, 0, 0, 1, 1]]      )
              with torch.no_grad():
                     __snake_case					  =       model(_UpperCamelCase			,   token_type_ids=_UpperCamelCase			,   output_hidden_states=_UpperCamelCase      )

              __snake_case					  =       11_52

              __snake_case					  =       torch.Size((1, 5, hidden_size)      )
              self.assertEqual(output["""last_hidden_state"""].shape			,   _UpperCamelCase      )

              __snake_case					  =       torch.tensor(
                  [
                      [
                          [0.0754, -0.2022, 0.1904],
                          [-0.3354, -0.3692, -0.4791],
                          [-0.2314, -0.6729, -0.0749],
                          [-0.0396, -0.3105, -0.4234],
                          [-0.1571, -0.0525, 0.5353],
                      ]
                  ]      )

              # Running on the original tf implementation gives slightly different results here.
              # Not clear why this variations is present
              # TODO: Find reason for discrepancy
              # expected_original_implementation = [[
              #     [0.07630594074726105, -0.20146065950393677, 0.19107051193714142],
              #     [-0.3405614495277405, -0.36971670389175415, -0.4808273911476135],
              #     [-0.22587086260318756, -0.6656315922737122, -0.07844287157058716],
              #     [-0.04145475849509239, -0.3077218234539032, -0.42316967248916626],
              #     [-0.15887849032878876, -0.054529931396245956, 0.5356100797653198]
              # ]]

              self.assertTrue(torch.allclose(output["""last_hidden_state"""][:, :, :3]			,   _UpperCamelCase			,   atol=1E-4      )      )




from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCamelCase__		   =    logging.get_logger(__name__)

UpperCamelCase__		   =    {
    '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
}

class 						__snake_case						(							snake_case__     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       "mobilevitv2"


       def __init__(		self			,   _UpperCamelCase=3			,   _UpperCamelCase=2_56			,   _UpperCamelCase=2			,   _UpperCamelCase=2.0			,   _UpperCamelCase="swish"			,   _UpperCamelCase=3			,   _UpperCamelCase=32			,   _UpperCamelCase=0.1			,   _UpperCamelCase=0.02			,   _UpperCamelCase=1E-5			,   _UpperCamelCase=5_12			,   _UpperCamelCase=[6, 12, 18]			,   _UpperCamelCase=0.1			,   _UpperCamelCase=2_55			,   _UpperCamelCase=[2, 4, 3]			,   _UpperCamelCase=[1_28, 1_92, 2_56]			,   _UpperCamelCase=1.0			,   _UpperCamelCase=2			,   _UpperCamelCase=0.0			,   _UpperCamelCase=0.0			,   **_UpperCamelCase			,   )			->       List[Any]:






              """simple docstring"""


              super().__init__(**_UpperCamelCase      )

              __snake_case					  =       num_channels
              __snake_case					  =       image_size
              __snake_case					  =       patch_size
              __snake_case					  =       expand_ratio
              __snake_case					  =       hidden_act
              __snake_case					  =       conv_kernel_size
              __snake_case					  =       output_stride
              __snake_case					  =       initializer_range
              __snake_case					  =       layer_norm_eps
              __snake_case					  =       n_attn_blocks
              __snake_case					  =       base_attn_unit_dims
              __snake_case					  =       width_multiplier
              __snake_case					  =       ffn_multiplier
              __snake_case					  =       ffn_dropout
              __snake_case					  =       attn_dropout
              __snake_case					  =       classifier_dropout_prob

              # decode head attributes for semantic segmentation
              __snake_case					  =       aspp_out_channels
              __snake_case					  =       atrous_rates
              __snake_case					  =       aspp_dropout_prob
              __snake_case					  =       semantic_loss_ignore_index






class 						__snake_case						(							snake_case__     ):
       """simple docstring"""







       __SCREAMING_SNAKE_CASE													=       version.parse("1.11"     )


       @property
       def  a		(		self      )			->       Mapping[str, Mapping[int, str]]:






              """simple docstring"""


              return OrderedDict([("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""})]      )


       @property
       def  a		(		self      )			->       Mapping[str, Mapping[int, str]]:






              """simple docstring"""


              if self.task == "image-classification":
                     return OrderedDict([("""logits""", {0: """batch"""})]      )
              else:
                     return OrderedDict([("""last_hidden_state""", {0: """batch"""}), ("""pooler_output""", {0: """batch"""})]      )






       @property
       def  a		(		self      )			->       float:






              """simple docstring"""


              return 1E-4

