
'''simple docstring'''





import inspect
import unittest

import numpy as np

from transformers import BeitConfig
from transformers.testing_utils import require_flax, require_vision, slow
from transformers.utils import cached_property, is_flax_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_flax_common import FlaxModelTesterMixin, floats_tensor, ids_tensor


if is_flax_available():
      import jax

      from transformers import FlaxBeitForImageClassification, FlaxBeitForMaskedImageModeling, FlaxBeitModel

if is_vision_available():
      from PIL import Image

      from transformers import BeitImageProcessor






class 							UpperCAmelCase_							(    unittest.TestCase				):

 '''simple docstring'''







 def __init__(					self		:  Optional[Any]			,				snake_case__		:  Dict			,				snake_case__		:  Dict=1_00			,				snake_case__		:  Optional[Any]=13			,				snake_case__		:  Optional[int]=30			,				snake_case__		:  List[Any]=2			,				snake_case__		:  Optional[int]=3			,				snake_case__		:  Optional[int]=True			,				snake_case__		:  Dict=True			,				snake_case__		:  Dict=32			,				snake_case__		:  List[Any]=5			,				snake_case__		:  Dict=4			,				snake_case__		:  List[str]=37			,				snake_case__		:  str="gelu"			,				snake_case__		:  Union[str, Any]=0.1			,				snake_case__		:  Dict=0.1			,				snake_case__		:  str=10			,				snake_case__		:  Union[str, Any]=0.02			,				snake_case__		:  Union[str, Any]=3			,				):



   '''simple docstring'''




   UpperCAmelCase__      :					Any				       =							parent
   UpperCAmelCase__      :					Union[str, Any]				       =							vocab_size
   UpperCAmelCase__      :					str				       =							batch_size
   UpperCAmelCase__      :					Dict				       =							image_size
   UpperCAmelCase__      :					int				       =							patch_size
   UpperCAmelCase__      :					Optional[Any]				       =							num_channels
   UpperCAmelCase__      :					Union[str, Any]				       =							is_training
   UpperCAmelCase__      :					List[str]				       =							use_labels
   UpperCAmelCase__      :					Any				       =							hidden_size
   UpperCAmelCase__      :					Tuple				       =							num_hidden_layers
   UpperCAmelCase__      :					str				       =							num_attention_heads
   UpperCAmelCase__      :					Optional[int]				       =							intermediate_size
   UpperCAmelCase__      :					Tuple				       =							hidden_act
   UpperCAmelCase__      :					int				       =							hidden_dropout_prob
   UpperCAmelCase__      :					Union[str, Any]				       =							attention_probs_dropout_prob
   UpperCAmelCase__      :					Optional[int]				       =							type_sequence_label_size
   UpperCAmelCase__      :					Union[str, Any]				       =							initializer_range

   # in BeiT, the seq length equals the number of patches + 1 (we add 1 for the [CLS] token)
   UpperCAmelCase__      :					int				       =							(image_size // patch_size) ** 2
   UpperCAmelCase__      :					Any				       =							num_patches + 1







 def 							UpperCamelCase  (					self		:  Dict ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[int]				       =							floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

   UpperCAmelCase__      :					Any				       =							None
   if self.use_labels:
     UpperCAmelCase__      :					Optional[Any]				       =							ids_tensor([self.batch_size]			,				self.type_sequence_label_size )

   UpperCAmelCase__      :					Any				       =							BeitConfig(
       vocab_size=self.vocab_size			,				image_size=self.image_size			,				patch_size=self.patch_size			,				num_channels=self.num_channels			,				hidden_size=self.hidden_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			,				is_decoder=snake_case__			,				initializer_range=self.initializer_range			,				)

   return config, pixel_values, labels







 def 							UpperCamelCase  (					self		:  Tuple			,				snake_case__		:  Optional[Any]			,				snake_case__		:  Optional[Any]			,				snake_case__		:  Optional[int] ):



   '''simple docstring'''




   UpperCAmelCase__      :					int				       =							FlaxBeitModel(config=snake_case__ )
   UpperCAmelCase__      :					Any				       =							model(snake_case__ )
   self.parent.assertEqual(result.last_hidden_state.shape			,				(self.batch_size, self.seq_length, self.hidden_size) )







 def 							UpperCamelCase  (					self		:  Any			,				snake_case__		:  Any			,				snake_case__		:  List[Any]			,				snake_case__		:  str ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[int]				       =							FlaxBeitForMaskedImageModeling(config=snake_case__ )
   UpperCAmelCase__      :					Tuple				       =							model(snake_case__ )
   self.parent.assertEqual(result.logits.shape			,				(self.batch_size, self.seq_length - 1, self.vocab_size) )







 def 							UpperCamelCase  (					self		:  List[Any]			,				snake_case__		:  Optional[int]			,				snake_case__		:  Optional[int]			,				snake_case__		:  List[str] ):



   '''simple docstring'''




   UpperCAmelCase__      :					List[str]				       =							self.type_sequence_label_size
   UpperCAmelCase__      :					List[str]				       =							FlaxBeitForImageClassification(config=snake_case__ )
   UpperCAmelCase__      :					List[Any]				       =							model(snake_case__ )
   self.parent.assertEqual(result.logits.shape			,				(self.batch_size, self.type_sequence_label_size) )

   # test greyscale images
   UpperCAmelCase__      :					int				       =							1
   UpperCAmelCase__      :					List[Any]				       =							FlaxBeitForImageClassification(snake_case__ )

   UpperCAmelCase__      :					int				       =							floats_tensor([self.batch_size, 1, self.image_size, self.image_size] )
   UpperCAmelCase__      :					Optional[int]				       =							model(snake_case__ )







 def 							UpperCamelCase  (					self		:  List[str] ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[int]				       =							self.prepare_config_and_inputs()
   (
       (
       UpperCAmelCase__
   )       ,			(
       UpperCAmelCase__
   )       ,			(
       UpperCAmelCase__
   )       ,			
   )      :					List[str]				       =							config_and_inputs
   UpperCAmelCase__      :					Optional[int]				       =							{"pixel_values": pixel_values}
   return config, inputs_dict






@require_flax
class 							UpperCAmelCase_							(    A					,				unittest.TestCase				):

 '''simple docstring'''
 lowercase_					:    Dict				=							(
     (FlaxBeitModel, FlaxBeitForImageClassification, FlaxBeitForMaskedImageModeling) if is_flax_available() else ()
 )







 def 							UpperCamelCase  (					self		:  List[Any] ):



   '''simple docstring'''




   UpperCAmelCase__      :					int				       =							FlaxBeitModelTester(self )
   UpperCAmelCase__      :					Union[str, Any]				       =							ConfigTester(self			,				config_class=snake_case__			,				has_text_modality=snake_case__			,				hidden_size=37 )







 def 							UpperCamelCase  (					self		:  int ):



   '''simple docstring'''




   self.config_tester.run_common_tests()







 def 							UpperCamelCase  (					self		:  int ):



   '''simple docstring'''




   UpperCAmelCase__       ,			UpperCAmelCase__      :					int				       =							self.model_tester.prepare_config_and_inputs_for_common()

   for model_class in self.all_model_classes:
     UpperCAmelCase__      :					Union[str, Any]				       =							model_class(snake_case__ )
     UpperCAmelCase__      :					int				       =							inspect.signature(model.__call__ )
     # signature.parameters is an OrderedDict => so arg_names order is deterministic
     UpperCAmelCase__      :					Optional[int]				       =							[*signature.parameters.keys()]

     UpperCAmelCase__      :					Optional[Any]				       =							["pixel_values"]
     self.assertListEqual(arg_names[:1]			,				snake_case__ )







 def 							UpperCamelCase  (					self		:  int ):



   '''simple docstring'''




   UpperCAmelCase__       ,			UpperCAmelCase__      :					Optional[Any]				       =							self.model_tester.prepare_config_and_inputs_for_common()

   for model_class in self.all_model_classes:
     with self.subTest(model_class.__name__ ):
       UpperCAmelCase__      :					List[str]				       =							self._prepare_for_class(snake_case__			,				snake_case__ )
       UpperCAmelCase__      :					Optional[Any]				       =							model_class(snake_case__ )

       @jax.jit
       def model_jitted(snake_case__		:  Dict			,				**snake_case__		:  Optional[int] ):
         return model(pixel_values=snake_case__			,				**snake_case__ )

       with self.subTest("JIT Enabled" ):
         UpperCAmelCase__      :					Optional[int]				       =							model_jitted(**snake_case__ ).to_tuple()

       with self.subTest("JIT Disabled" ):
         with jax.disable_jit():
           UpperCAmelCase__      :					Optional[Any]				       =							model_jitted(**snake_case__ ).to_tuple()

       self.assertEqual(len(snake_case__ )			,				len(snake_case__ ) )
       for jitted_output, output in zip(snake_case__			,				snake_case__ ):
         self.assertEqual(jitted_output.shape			,				output.shape )







 def 							UpperCamelCase  (					self		:  Dict ):



   '''simple docstring'''




   UpperCAmelCase__      :					Union[str, Any]				       =							self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_model(*snake_case__ )







 def 							UpperCamelCase  (					self		:  Union[str, Any] ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[Any]				       =							self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_for_masked_lm(*snake_case__ )







 def 							UpperCamelCase  (					self		:  Any ):



   '''simple docstring'''




   UpperCAmelCase__      :					List[str]				       =							self.model_tester.prepare_config_and_inputs()
   self.model_tester.create_and_check_for_image_classification(*snake_case__ )







 @slow
 def 							UpperCamelCase  (					self		:  Any ):



   '''simple docstring'''




   for model_class_name in self.all_model_classes:
     UpperCAmelCase__      :					Tuple				       =							model_class_name.from_pretrained("microsoft/beit-base-patch16-224" )
     UpperCAmelCase__      :					Optional[Any]				       =							model(np.ones((1, 3, 2_24, 2_24) ) )
     self.assertIsNotNone(snake_case__ )







def snake_case_     (					):
  UpperCAmelCase__      :					str				       =							Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"		)
  return image






@require_vision
@require_flax
class 							UpperCAmelCase_							(    unittest.TestCase				):

 '''simple docstring'''







 @cached_property
 def 							UpperCamelCase  (					self		:  Optional[int] ):



   '''simple docstring'''




   return BeitImageProcessor.from_pretrained("microsoft/beit-base-patch16-224" ) if is_vision_available() else None







 @slow
 def 							UpperCamelCase  (					self		:  Dict ):



   '''simple docstring'''




   UpperCAmelCase__      :					List[Any]				       =							FlaxBeitForMaskedImageModeling.from_pretrained("microsoft/beit-base-patch16-224-pt22k" )

   UpperCAmelCase__      :					Union[str, Any]				       =							self.default_image_processor
   UpperCAmelCase__      :					Optional[int]				       =							prepare_img()
   UpperCAmelCase__      :					List[Any]				       =							image_processor(images=snake_case__			,				return_tensors="np" ).pixel_values

   # prepare bool_masked_pos
   UpperCAmelCase__      :					Tuple				       =							np.ones((1, 1_96)			,				dtype=snake_case__ )

   # forward pass
   UpperCAmelCase__      :					List[Any]				       =							model(pixel_values=snake_case__			,				bool_masked_pos=snake_case__ )
   UpperCAmelCase__      :					int				       =							outputs.logits

   # verify the logits
   UpperCAmelCase__      :					Any				       =							(1, 1_96, 81_92)
   self.assertEqual(logits.shape			,				snake_case__ )

   UpperCAmelCase__      :					List[str]				       =							np.array(
       [[-3.2437, 0.5072, -13.9174], [-3.2456, 0.4948, -13.9401], [-3.2033, 0.5121, -13.8550]] )

   self.assertTrue(np.allclose(logits[bool_masked_pos][:3, :3]			,				snake_case__			,				atol=1e-2 ) )







 @slow
 def 							UpperCamelCase  (					self		:  str ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[Any]				       =							FlaxBeitForImageClassification.from_pretrained("microsoft/beit-base-patch16-224" )

   UpperCAmelCase__      :					str				       =							self.default_image_processor
   UpperCAmelCase__      :					Tuple				       =							prepare_img()
   UpperCAmelCase__      :					Dict				       =							image_processor(images=snake_case__			,				return_tensors="np" )

   # forward pass
   UpperCAmelCase__      :					Union[str, Any]				       =							model(**snake_case__ )
   UpperCAmelCase__      :					Optional[Any]				       =							outputs.logits

   # verify the logits
   UpperCAmelCase__      :					Union[str, Any]				       =							(1, 10_00)
   self.assertEqual(logits.shape			,				snake_case__ )

   UpperCAmelCase__      :					int				       =							np.array([-1.2385, -1.0987, -1.0108] )

   self.assertTrue(np.allclose(logits[0, :3]			,				snake_case__			,				atol=1e-4 ) )

   UpperCAmelCase__      :					Any				       =							2_81
   self.assertEqual(logits.argmax(-1 ).item()			,				snake_case__ )







 @slow
 def 							UpperCamelCase  (					self		:  Tuple ):



   '''simple docstring'''




   UpperCAmelCase__      :					str				       =							FlaxBeitForImageClassification.from_pretrained("microsoft/beit-large-patch16-224-pt22k-ft22k" )

   UpperCAmelCase__      :					Union[str, Any]				       =							self.default_image_processor
   UpperCAmelCase__      :					List[Any]				       =							prepare_img()
   UpperCAmelCase__      :					Optional[Any]				       =							image_processor(images=snake_case__			,				return_tensors="np" )

   # forward pass
   UpperCAmelCase__      :					Dict				       =							model(**snake_case__ )
   UpperCAmelCase__      :					Optional[int]				       =							outputs.logits

   # verify the logits
   UpperCAmelCase__      :					Optional[Any]				       =							(1, 2_18_41)
   self.assertEqual(logits.shape			,				snake_case__ )

   UpperCAmelCase__      :					Union[str, Any]				       =							np.array([1.6881, -0.2787, 0.5901] )

   self.assertTrue(np.allclose(logits[0, :3]			,				snake_case__			,				atol=1e-4 ) )

   UpperCAmelCase__      :					Dict				       =							23_96
   self.assertEqual(logits.argmax(-1 ).item()			,				snake_case__ )





'''simple docstring'''





import unittest

from transformers import BigBirdConfig, is_flax_available
from transformers.testing_utils import require_flax, slow

from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, random_attention_mask


if is_flax_available():
      import jax

      from transformers.models.big_bird.modeling_flax_big_bird import (
          FlaxBigBirdForCausalLM,
          FlaxBigBirdForMaskedLM,
          FlaxBigBirdForMultipleChoice,
          FlaxBigBirdForPreTraining,
          FlaxBigBirdForQuestionAnswering,
          FlaxBigBirdForSequenceClassification,
          FlaxBigBirdForTokenClassification,
          FlaxBigBirdModel,
      )






class 							UpperCAmelCase_							(    unittest.TestCase				):

 '''simple docstring'''







 def __init__(					self		:  Tuple			,				snake_case__		:  List[str]			,				snake_case__		:  Union[str, Any]=2			,				snake_case__		:  int=56			,				snake_case__		:  Any=True			,				snake_case__		:  Union[str, Any]=True			,				snake_case__		:  Optional[int]=True			,				snake_case__		:  Any=True			,				snake_case__		:  Tuple=99			,				snake_case__		:  Any=32			,				snake_case__		:  List[Any]=2			,				snake_case__		:  Optional[Any]=2			,				snake_case__		:  Any=7			,				snake_case__		:  Union[str, Any]="gelu_new"			,				snake_case__		:  List[Any]=0.1			,				snake_case__		:  Optional[Any]=0.1			,				snake_case__		:  Optional[int]=5_12			,				snake_case__		:  Optional[int]=16			,				snake_case__		:  int=2			,				snake_case__		:  List[Any]=0.02			,				snake_case__		:  int=4			,				snake_case__		:  Optional[Any]="block_sparse"			,				snake_case__		:  Union[str, Any]=True			,				snake_case__		:  List[Any]=False			,				snake_case__		:  Optional[Any]=2			,				snake_case__		:  Optional[Any]=3			,				):



   '''simple docstring'''




   UpperCAmelCase__      :					List[Any]				       =							parent
   UpperCAmelCase__      :					Dict				       =							batch_size
   UpperCAmelCase__      :					Tuple				       =							seq_length
   UpperCAmelCase__      :					Optional[int]				       =							is_training
   UpperCAmelCase__      :					Optional[int]				       =							use_attention_mask
   UpperCAmelCase__      :					List[Any]				       =							use_token_type_ids
   UpperCAmelCase__      :					Dict				       =							use_labels
   UpperCAmelCase__      :					Tuple				       =							vocab_size
   UpperCAmelCase__      :					str				       =							hidden_size
   UpperCAmelCase__      :					List[str]				       =							num_hidden_layers
   UpperCAmelCase__      :					Union[str, Any]				       =							num_attention_heads
   UpperCAmelCase__      :					Optional[int]				       =							intermediate_size
   UpperCAmelCase__      :					Optional[int]				       =							hidden_act
   UpperCAmelCase__      :					Union[str, Any]				       =							hidden_dropout_prob
   UpperCAmelCase__      :					str				       =							attention_probs_dropout_prob
   UpperCAmelCase__      :					str				       =							max_position_embeddings
   UpperCAmelCase__      :					Any				       =							type_vocab_size
   UpperCAmelCase__      :					Dict				       =							type_sequence_label_size
   UpperCAmelCase__      :					Dict				       =							initializer_range
   UpperCAmelCase__      :					Any				       =							num_choices

   UpperCAmelCase__      :					List[str]				       =							rescale_embeddings
   UpperCAmelCase__      :					Union[str, Any]				       =							attention_type
   UpperCAmelCase__      :					Union[str, Any]				       =							use_bias
   UpperCAmelCase__      :					Union[str, Any]				       =							block_size
   UpperCAmelCase__      :					Any				       =							num_random_blocks







 def 							UpperCamelCase  (					self		:  Optional[Any] ):



   '''simple docstring'''




   UpperCAmelCase__      :					Optional[int]				       =							ids_tensor([self.batch_size, self.seq_length]			,				self.vocab_size )

   UpperCAmelCase__      :					Optional[Any]				       =							None
   if self.use_attention_mask:
     UpperCAmelCase__      :					List[Any]				       =							random_attention_mask([self.batch_size, self.seq_length] )

   UpperCAmelCase__      :					Union[str, Any]				       =							None
   if self.use_token_type_ids:
     UpperCAmelCase__      :					Any				       =							ids_tensor([self.batch_size, self.seq_length]			,				self.type_vocab_size )

   UpperCAmelCase__      :					Union[str, Any]				       =							BigBirdConfig(
       vocab_size=self.vocab_size			,				hidden_size=self.hidden_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=snake_case__			,				initializer_range=self.initializer_range			,				attention_type=self.attention_type			,				block_size=self.block_size			,				num_random_blocks=self.num_random_blocks			,				use_bias=self.use_bias			,				rescale_embeddings=self.rescale_embeddings			,				)

   return config, input_ids, token_type_ids, attention_mask







 def 							UpperCamelCase  (					self		:  Tuple ):



   '''simple docstring'''




   UpperCAmelCase__      :					int				       =							self.prepare_config_and_inputs()
   UpperCAmelCase__       ,			UpperCAmelCase__       ,			UpperCAmelCase__       ,			UpperCAmelCase__      :					Tuple				       =							config_and_inputs
   UpperCAmelCase__      :					str				       =							{
       "input_ids": input_ids,
       "token_type_ids": token_type_ids,
       "attention_mask": attention_mask,
   }
   return config, inputs_dict






@require_flax
class 							UpperCAmelCase_							(    A					,				unittest.TestCase				):

 '''simple docstring'''
 lowercase_					:    Any				=							(
     (
         FlaxBigBirdForCausalLM,
         FlaxBigBirdModel,
         FlaxBigBirdForPreTraining,
         FlaxBigBirdForMaskedLM,
         FlaxBigBirdForMultipleChoice,
         FlaxBigBirdForQuestionAnswering,
         FlaxBigBirdForSequenceClassification,
         FlaxBigBirdForTokenClassification,
     )
     if is_flax_available()
     else ()
 )

 lowercase_					:    Optional[Any]				=							False
 lowercase_					:    str				=							False







 def 							UpperCamelCase  (					self		:  Optional[Any] ):



   '''simple docstring'''




   UpperCAmelCase__      :					int				       =							FlaxBigBirdModelTester(self )







 @slow
 # copied from `test_modeling_flax_common` because it takes much longer than other models
 def 							UpperCamelCase  (					self		:  List[Any] ):



   '''simple docstring'''




   super().test_from_pretrained_save_pretrained()







 @slow
 # copied from `test_modeling_flax_common` because it takes much longer than other models
 def 							UpperCamelCase  (					self		:  Tuple ):



   '''simple docstring'''




   super().test_from_pretrained_with_no_automatic_init()







 @slow
 # copied from `test_modeling_flax_common` because it takes much longer than other models
 def 							UpperCamelCase  (					self		:  Tuple ):



   '''simple docstring'''




   super().test_no_automatic_init()







 @slow
 # copied from `test_modeling_flax_common` because it takes much longer than other models
 def 							UpperCamelCase  (					self		:  Dict ):



   '''simple docstring'''




   super().test_hidden_states_output()







 @slow
 def 							UpperCamelCase  (					self		:  List[Any] ):



   '''simple docstring'''




   for model_class_name in self.all_model_classes:
     UpperCAmelCase__      :					List[Any]				       =							model_class_name.from_pretrained("google/bigbird-roberta-base" )
     self.assertIsNotNone(snake_case__ )







 def 							UpperCamelCase  (					self		:  Union[str, Any] ):



   '''simple docstring'''




   if self.test_attn_probs:
     super().test_attention_outputs()







 @slow
 # copied from `test_modeling_flax_common` because it takes much longer than other models
 def 							UpperCamelCase  (					self		:  int ):



   '''simple docstring'''




   UpperCAmelCase__       ,			UpperCAmelCase__      :					str				       =							self.model_tester.prepare_config_and_inputs_for_common()

   for model_class in self.all_model_classes:
     with self.subTest(model_class.__name__ ):
       UpperCAmelCase__      :					Union[str, Any]				       =							self._prepare_for_class(snake_case__			,				snake_case__ )
       UpperCAmelCase__      :					List[Any]				       =							model_class(snake_case__ )

       @jax.jit
       def model_jitted(snake_case__		:  int			,				snake_case__		:  Optional[int]=None			,				**snake_case__		:  Optional[Any] ):
         return model(input_ids=snake_case__			,				attention_mask=snake_case__			,				**snake_case__ )

       with self.subTest("JIT Enabled" ):
         UpperCAmelCase__      :					List[Any]				       =							model_jitted(**snake_case__ ).to_tuple()

       with self.subTest("JIT Disabled" ):
         with jax.disable_jit():
           UpperCAmelCase__      :					Tuple				       =							model_jitted(**snake_case__ ).to_tuple()

       self.assertEqual(len(snake_case__ )			,				len(snake_case__ ) )
       for jitted_output, output in zip(snake_case__			,				snake_case__ ):
         self.assertEqual(jitted_output.shape			,				output.shape )







 def 							UpperCamelCase  (					self		:  List[str]			,				snake_case__		:  int			,				snake_case__		:  Dict			,				snake_case__		:  Any			,				snake_case__		:  Union[str, Any]=1e-5			,				snake_case__		:  Any="outputs"			,				snake_case__		:  Optional[Any]=None ):



   '''simple docstring'''




   if name.startswith("outputs.attentions" ):
     return
   else:
     super().check_pt_flax_outputs(snake_case__			,				snake_case__			,				snake_case__			,				snake_case__			,				snake_case__			,				snake_case__ )



