






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


UpperCamelCase        =				logging.get_logger(__name__)

UpperCamelCase        =				{
    "sayakpaul/vit-msn-base": "https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}

class        lowerCAmelCase_				(      __a	):







				"""simple docstring"""




				_snake_case				:   Dict        =			'''vit_msn'''







				def __init__( self     :Union[str, Any]  ,     lowerCamelCase__     :Dict=7_68  ,     lowerCamelCase__     :Optional[int]=12  ,     lowerCamelCase__     :str=12  ,     lowerCamelCase__     :List[Any]=30_72  ,     lowerCamelCase__     :Dict="gelu"  ,     lowerCamelCase__     :int=0.0  ,     lowerCamelCase__     :Optional[int]=0.0  ,     lowerCamelCase__     :List[Any]=0.02  ,     lowerCamelCase__     :Optional[Any]=1e-06  ,     lowerCamelCase__     :List[Any]=2_24  ,     lowerCamelCase__     :List[Any]=16  ,     lowerCamelCase__     :Tuple=3  ,     lowerCamelCase__     :Dict=True  ,     **lowerCamelCase__     :Optional[Any]  ,     ):
					super().__init__(**lowerCAmelCase__     )

					UpperCamelCase__ :int						=      hidden_size
					UpperCamelCase__ :Tuple						=      num_hidden_layers
					UpperCamelCase__ :str						=      num_attention_heads
					UpperCamelCase__ :Tuple						=      intermediate_size
					UpperCamelCase__ :List[Any]						=      hidden_act
					UpperCamelCase__ :Tuple						=      hidden_dropout_prob
					UpperCamelCase__ :Any						=      attention_probs_dropout_prob
					UpperCamelCase__ :Optional[int]						=      initializer_range
					UpperCamelCase__ :List[Any]						=      layer_norm_eps
					UpperCamelCase__ :str						=      image_size
					UpperCamelCase__ :Union[str, Any]						=      patch_size
					UpperCamelCase__ :Tuple						=      num_channels
					UpperCamelCase__ :Dict						=      qkv_bias

def  __snake_case							(	__magic_name__						):







				'''simple docstring'''


				lowercase         =      set()
				# To detect a back edge, keep track of vertices currently in the recursion stack
				lowercase         =      set()
				return any(
				    node not in visited and depth_first_search(__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						)
				    for node in graph						)

def  __snake_case							(	__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						):







				'''simple docstring'''


				visited.add(__magic_name__						)
				rec_stk.add(__magic_name__						)

				for node in graph[vertex]:
								if node not in visited:
												if depth_first_search(__magic_name__		,    __magic_name__		,    __magic_name__		,    __magic_name__						):
																return True
								elif node in rec_stk:
												return True

    # The node needs to be removed from recursion stack before function ends
				rec_stk.remove(__magic_name__						)
				return False


if __name__ == "__main__":
						from doctest import testmod

						testmod()
