


from ..utils import DummyObject, requires_backends





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: List[Any]							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Dict							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: str							, *__snake_case					: List[Any]							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: str							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: Any							, *__snake_case					: int							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Dict							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Optional[Any]							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: Tuple							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: Optional[int]							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: str							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Tuple							, **__snake_case					: Optional[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: str							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: Optional[Any]							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: str							, *__snake_case					: Optional[int]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Union[str, Any]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[Any]								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Dict							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: int							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Optional[int]							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: str							, *__snake_case					: str							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Optional[int]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Optional[int]							, *__snake_case					: List[str]							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: int							, *__snake_case					: List[str]							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[str]								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: Tuple							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: str							, *__snake_case					: Union[str, Any]							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Union[str, Any]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: List[str]							, **__snake_case					: str						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Union[str, Any]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: int							, *__snake_case					: Any							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: Dict							, *__snake_case					: Union[str, Any]							, **__snake_case					: Optional[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Optional[int]							, *__snake_case					: str							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Tuple							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[Any]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: Dict							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[str]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: int							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Any							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Tuple							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[str]								=			['vision']





    def __init__(						self					: Dict							, *__snake_case					: List[Any]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[Any]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: str							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: List[Any]							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: Tuple							, **__snake_case					: str						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: Optional[int]							, *__snake_case					: Optional[int]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Dict							, *__snake_case					: str							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: int							, *__snake_case					: int							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Optional[Any]							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: int							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: Dict							, *__snake_case					: List[Any]							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: str							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: str							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: int							, *__snake_case					: Optional[Any]							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  str								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Optional[Any]							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[str]								=			['vision']





    def __init__(						self					: Any							, *__snake_case					: Optional[int]							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Optional[int]							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: List[Any]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: str							, *__snake_case					: int							, **__snake_case					: str						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: int							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[Any]								=			['vision']





    def __init__(						self					: int							, *__snake_case					: Union[str, Any]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: List[str]							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: Optional[int]							, *__snake_case					: str							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: List[Any]							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: List[Any]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: Optional[int]							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: str							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Union[str, Any]								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Optional[int]							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: List[str]							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: Dict							, **__snake_case					: Optional[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: Tuple							, *__snake_case					: Union[str, Any]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: str							, **__snake_case					: Any						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Tuple								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Tuple							, **__snake_case					: int						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  int								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: Dict							, **__snake_case					: Dict						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[Any]								=			['vision']





    def __init__(						self					: List[str]							, *__snake_case					: Union[str, Any]							, **__snake_case					: Tuple						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Dict								=			['vision']





    def __init__(						self					: Optional[int]							, *__snake_case					: Union[str, Any]							, **__snake_case					: Union[str, Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Any								=			['vision']





    def __init__(						self					: Optional[Any]							, *__snake_case					: int							, **__snake_case					: Optional[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  List[str]								=			['vision']





    def __init__(						self					: List[Any]							, *__snake_case					: Optional[Any]							, **__snake_case					: List[str]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[Any]								=			['vision']





    def __init__(						self					: Union[str, Any]							, *__snake_case					: Dict							, **__snake_case					: Optional[int]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)





class 			lowerCAmelCase__(     metaclass=snake_case__    ):






    '''simple docstring'''





    A_	:  Optional[int]								=			['vision']





    def __init__(						self					: str							, *__snake_case					: int							, **__snake_case					: List[Any]						):





       '''simple docstring'''
       requires_backends(self							, ['''vision''']						)



import unittest

import numpy as np

from transformers import ElectraConfig, 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():
       from transformers.models.electra.modeling_flax_electra import (
           FlaxElectraForCausalLM,
           FlaxElectraForMaskedLM,
           FlaxElectraForMultipleChoice,
           FlaxElectraForPreTraining,
           FlaxElectraForQuestionAnswering,
           FlaxElectraForSequenceClassification,
           FlaxElectraForTokenClassification,
           FlaxElectraModel,
       )





class 			lowerCAmelCase__(     unittest.TestCase    ):






    '''simple docstring'''





    def __init__(						self					: Any							, __snake_case					: Tuple							, __snake_case					: Union[str, Any]=13							, __snake_case					: Tuple=7							, __snake_case					: str=True							, __snake_case					: List[Any]=True							, __snake_case					: Optional[int]=True							, __snake_case					: List[str]=True							, __snake_case					: Tuple=99							, __snake_case					: int=24							, __snake_case					: int=32							, __snake_case					: Tuple=5							, __snake_case					: int=4							, __snake_case					: Any=37							, __snake_case					: int="gelu"							, __snake_case					: Union[str, Any]=0.1							, __snake_case					: Optional[Any]=0.1							, __snake_case					: str=512							, __snake_case					: List[Any]=16							, __snake_case					: Tuple=2							, __snake_case					: List[str]=0.02							, __snake_case					: Any=4							, ):





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





    def        _lowerCamelCase			(						self					: Optional[int]						):





       '''simple docstring'''
       UpperCAmelCase_				:   Any							= ids_tensor([self.batch_size, self.seq_length]							, self.vocab_size						)

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

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

       UpperCAmelCase_				:   int							= ElectraConfig(
           vocab_size=self.vocab_size							, hidden_size=self.hidden_size							, embedding_size=self.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							, initializer_range=self.initializer_range							, )

       return config, input_ids, token_type_ids, attention_mask





    def        _lowerCamelCase			(						self					: int						):





       '''simple docstring'''
       UpperCAmelCase_				:   List[str]							= self.prepare_config_and_inputs()
       UpperCAmelCase_		,   UpperCAmelCase_		,   UpperCAmelCase_		,   UpperCAmelCase_				:   Union[str, Any]							= config_and_inputs
       UpperCAmelCase_				:   Optional[Any]							= {'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': attention_mask}
       return config, inputs_dict





@require_flax
class 			lowerCAmelCase__(     snake_case__     ,     unittest.TestCase    ):






    '''simple docstring'''





    A_	:  Any								=			True

    A_	:  int								=			(
        (
            FlaxElectraModel,
            FlaxElectraForCausalLM,
            FlaxElectraForMaskedLM,
            FlaxElectraForPreTraining,
            FlaxElectraForTokenClassification,
            FlaxElectraForQuestionAnswering,
            FlaxElectraForMultipleChoice,
            FlaxElectraForSequenceClassification,
        )
        if is_flax_available()
        else ()
    )





    def        _lowerCamelCase			(						self					: Optional[int]						):





       '''simple docstring'''
       UpperCAmelCase_				:   List[str]							= FlaxElectraModelTester(self						)





    @slow
    def        _lowerCamelCase			(						self					: Union[str, Any]						):





       '''simple docstring'''
       for model_class_name in self.all_model_classes:
          if model_class_name == FlaxElectraForMaskedLM:
             UpperCAmelCase_				:   List[str]							= model_class_name.from_pretrained('''google/electra-small-generator'''						)
          else:
             UpperCAmelCase_				:   Optional[Any]							= model_class_name.from_pretrained('''google/electra-small-discriminator'''						)
          UpperCAmelCase_				:   Tuple							= model(np.ones((1, 1)						)						)
          self.assertIsNotNone(__snake_case						)