





'''simple docstring'''

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__		:     Union[str, Any]			=							logging.get_logger(__name__)

lowercase__		:     Dict			=							{
    'facebook/vit-mae-base': 'https://huggingface.co/facebook/vit-mae-base/resolve/main/config.json',
    # See all ViT MAE models at https://huggingface.co/models?filter=vit-mae
}
class 							__lowerCAmelCase	(       __magic_name__					):






       """simple docstring"""
       _snake_case      :	Optional[Any]									=       'vit_mae'





       def __init__(				self  :						str			,					lowerCAmelCase__  :						Optional[int]=768			,					lowerCAmelCase__  :						Optional[int]=12			,					lowerCAmelCase__  :						List[Any]=12			,					lowerCAmelCase__  :						Dict=3072			,					lowerCAmelCase__  :						Optional[int]="gelu"			,					lowerCAmelCase__  :						Tuple=0.0			,					lowerCAmelCase__  :						List[str]=0.0			,					lowerCAmelCase__  :						List[Any]=0.02			,					lowerCAmelCase__  :						List[str]=1e-1_2			,					lowerCAmelCase__  :						Union[str, Any]=224			,					lowerCAmelCase__  :						Dict=16			,					lowerCAmelCase__  :						Optional[Any]=3			,					lowerCAmelCase__  :						Tuple=True			,					lowerCAmelCase__  :						str=16			,					lowerCAmelCase__  :						Union[str, Any]=512			,					lowerCAmelCase__  :						Optional[Any]=8			,					lowerCAmelCase__  :						Optional[Any]=2048			,					lowerCAmelCase__  :						Optional[int]=0.75			,					lowerCAmelCase__  :						List[str]=False			,					**lowerCAmelCase__  :						int			,					)       ->	Dict:

            '''simple docstring'''




            super().__init__(**lowerCAmelCase__	)

            _UpperCamelCase							       =			hidden_size
            _UpperCamelCase							       =			num_hidden_layers
            _UpperCamelCase							       =			num_attention_heads
            _UpperCamelCase							       =			intermediate_size
            _UpperCamelCase							       =			hidden_act
            _UpperCamelCase							       =			hidden_dropout_prob
            _UpperCamelCase							       =			attention_probs_dropout_prob
            _UpperCamelCase							       =			initializer_range
            _UpperCamelCase							       =			layer_norm_eps
            _UpperCamelCase							       =			image_size
            _UpperCamelCase							       =			patch_size
            _UpperCamelCase							       =			num_channels
            _UpperCamelCase							       =			qkv_bias
            _UpperCamelCase							       =			decoder_num_attention_heads
            _UpperCamelCase							       =			decoder_hidden_size
            _UpperCamelCase							       =			decoder_num_hidden_layers
            _UpperCamelCase							       =			decoder_intermediate_size
            _UpperCamelCase							       =			mask_ratio
            _UpperCamelCase							       =			norm_pix_loss







'''simple docstring'''
import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin






class 					__lowerCAmelCase   (   unittest.TestCase				,			lowercase						):

						"""simple docstring"""






						def 				_UpperCAmelCase       (  self							:      List[str]	):
													A_			    =		load_tool("text-classification"	)
													self.tool.setup()
													A_			    =		load_tool("text-classification" ,  remote=lowerCAmelCase	)






						def 				_UpperCAmelCase       (  self							:      Union[str, Any]	):
													A_			    =		self.tool("That's quite cool" ,  ["positive", "negative"]	)
													self.assertEqual(lowerCAmelCase ,  "positive"	)






						def 				_UpperCAmelCase       (  self							:      str	):
													A_			    =		self.remote_tool("That's quite cool" ,  ["positive", "negative"]	)
													self.assertEqual(lowerCAmelCase ,  "positive"	)






						def 				_UpperCAmelCase       (  self							:      str	):
													A_			    =		self.tool(text="That's quite cool" ,  labels=["positive", "negative"]	)
													self.assertEqual(lowerCAmelCase ,  "positive"	)






						def 				_UpperCAmelCase       (  self							:      List[Any]	):
													A_			    =		self.remote_tool(text="That's quite cool" ,  labels=["positive", "negative"]	)
													self.assertEqual(lowerCAmelCase ,  "positive"	)





