






class   lowerCamelCase      :







		'''simple docstring'''



		def __init__(							self				,		_UpperCamelCase   )	->							None:
							UpperCAmelCase_    :      int            =						len(__lowercase   )
							UpperCAmelCase_    :      Dict            =						[0] * len_array

							if len_array > 0:
												UpperCAmelCase_    :      List[Any]            =						array[0]

							for i in range(1				,		__lowercase   ):
												UpperCAmelCase_    :      int            =						self.prefix_sum[i - 1] + array[i]



		def 					__UpperCAmelCase			(							self				,		_UpperCamelCase				,		_UpperCamelCase   )	->							int:
							if start == 0:
												return self.prefix_sum[end]

							return self.prefix_sum[end] - self.prefix_sum[start - 1]



		def 					__UpperCAmelCase			(							self				,		_UpperCamelCase   )	->							bool:
							UpperCAmelCase_    :      Optional[Any]            =						{0}
							for sum_item in self.prefix_sum:
												if sum_item - target_sum in sums:
																	return True

												sums.add(__lowercase   )

							return False


if __name__ == "__main__":
		import doctest

		doctest.testmod()










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


_UpperCAmelCase	:     Optional[Any]   =logging.get_logger(__name__)

_UpperCAmelCase	:     str   ={
    """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  snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__					:     Optional[Any]    =							"""vit_mae"""




						def __init__( self      ,  __lowercase=7_6_8      ,  __lowercase=1_2      ,  __lowercase=1_2      ,  __lowercase=3_0_7_2      ,  __lowercase="gelu"      ,  __lowercase=0.0      ,  __lowercase=0.0      ,  __lowercase=0.02      ,  __lowercase=1e-12      ,  __lowercase=2_2_4      ,  __lowercase=1_6      ,  __lowercase=3      ,  __lowercase=True      ,  __lowercase=1_6      ,  __lowercase=5_1_2      ,  __lowercase=8      ,  __lowercase=2_0_4_8      ,  __lowercase=0.75      ,  __lowercase=False      ,  **__lowercase      ,  )    ->			str:
										super().__init__(**__lowercase							)

										lowerCAmelCase_       :					Dict			 = hidden_size
										lowerCAmelCase_       :					Any			 = num_hidden_layers
										lowerCAmelCase_       :					Any			 = num_attention_heads
										lowerCAmelCase_       :					int			 = intermediate_size
										lowerCAmelCase_       :					Dict			 = hidden_act
										lowerCAmelCase_       :					int			 = hidden_dropout_prob
										lowerCAmelCase_       :					str			 = attention_probs_dropout_prob
										lowerCAmelCase_       :					List[str]			 = initializer_range
										lowerCAmelCase_       :					Dict			 = layer_norm_eps
										lowerCAmelCase_       :					Union[str, Any]			 = image_size
										lowerCAmelCase_       :					Optional[int]			 = patch_size
										lowerCAmelCase_       :					Tuple			 = num_channels
										lowerCAmelCase_       :					List[str]			 = qkv_bias
										lowerCAmelCase_       :					List[Any]			 = decoder_num_attention_heads
										lowerCAmelCase_       :					int			 = decoder_hidden_size
										lowerCAmelCase_       :					Optional[int]			 = decoder_num_hidden_layers
										lowerCAmelCase_       :					Tuple			 = decoder_intermediate_size
										lowerCAmelCase_       :					Tuple			 = mask_ratio
										lowerCAmelCase_       :					Any			 = norm_pix_loss