






snake_case__   :						Optional[Any]													=   tuple[float, float, float]
snake_case__   :						Any													=   tuple[float, float, float]






def      _snake_case     (__lowercase     ,   __lowercase):
   UpperCamelCase_						=  end_pointa[0] - end_pointa[0]
   UpperCamelCase_						=  end_pointa[1] - end_pointa[1]
   UpperCamelCase_						=  end_pointa[2] - end_pointa[2]
   return (x, y, z)






def      _snake_case     (__lowercase     ,   __lowercase):
   UpperCamelCase_						=  ab[1] * ac[2] - ab[2] * ac[1]  # *i
   UpperCamelCase_						=  (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
   UpperCamelCase_						=  ab[0] * ac[1] - ab[1] * ac[0]  # *k
   return (x, y, z)






def      _snake_case     (__lowercase     ,   __lowercase):
   return tuple(round(__lowercase     ,   __lowercase) for x in vector) == (0, 0, 0)






def      _snake_case     (__lowercase     ,   __lowercase     ,   __lowercase     ,   __lowercase = 10):
   UpperCamelCase_						=  create_vector(__lowercase     ,   __lowercase)
   UpperCamelCase_						=  create_vector(__lowercase     ,   __lowercase)
   return is_zero_vector(get_ad_vectors_cross(__lowercase     ,   __lowercase)     ,   __lowercase)












'''simple docstring'''




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


__UpperCAmelCase            =       logging.get_logger(__name__)

__UpperCAmelCase            =       {
    """naver-clova-ix/donut-base""": """https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json""",
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}




class      UpperCamelCase__					(					lowercase_			):




					"""simple docstring"""
					SCREAMING_SNAKE_CASE__				=	'''donut-swin'''

					SCREAMING_SNAKE_CASE__				=	{
					    '''num_attention_heads''': '''num_heads''',
					    '''num_hidden_layers''': '''num_layers''',
					}


					def __init__(						self				:			str      ,						lowerCamelCase_				:			Union[str, Any]=2_24      ,						lowerCamelCase_				:			Union[str, Any]=4      ,						lowerCamelCase_				:			Optional[Any]=3      ,						lowerCamelCase_				:			Dict=96      ,						lowerCamelCase_				:			int=[2, 2, 6, 2]      ,						lowerCamelCase_				:			Optional[Any]=[3, 6, 12, 24]      ,						lowerCamelCase_				:			List[str]=7      ,						lowerCamelCase_				:			List[str]=4.0      ,						lowerCamelCase_				:			Optional[Any]=True      ,						lowerCamelCase_				:			List[str]=0.0      ,						lowerCamelCase_				:			Dict=0.0      ,						lowerCamelCase_				:			Dict=0.1      ,						lowerCamelCase_				:			Union[str, Any]="gelu"      ,						lowerCamelCase_				:			List[str]=False      ,						lowerCamelCase_				:			Optional[int]=0.02      ,						lowerCamelCase_				:			Any=1e-5      ,						**lowerCamelCase_				:			Union[str, Any]      ,						):

							'''simple docstring'''



							super().__init__(**lowerCamelCase_						)

							SCREAMING_SNAKE_CASE :				int		=			image_size
							SCREAMING_SNAKE_CASE :				Dict		=			patch_size
							SCREAMING_SNAKE_CASE :				str		=			num_channels
							SCREAMING_SNAKE_CASE :				Union[str, Any]		=			embed_dim
							SCREAMING_SNAKE_CASE :				Optional[int]		=			depths
							SCREAMING_SNAKE_CASE :				Union[str, Any]		=			len(lowerCamelCase_						)
							SCREAMING_SNAKE_CASE :				Optional[int]		=			num_heads
							SCREAMING_SNAKE_CASE :				Optional[int]		=			window_size
							SCREAMING_SNAKE_CASE :				Optional[Any]		=			mlp_ratio
							SCREAMING_SNAKE_CASE :				Dict		=			qkv_bias
							SCREAMING_SNAKE_CASE :				Optional[int]		=			hidden_dropout_prob
							SCREAMING_SNAKE_CASE :				Tuple		=			attention_probs_dropout_prob
							SCREAMING_SNAKE_CASE :				Dict		=			drop_path_rate
							SCREAMING_SNAKE_CASE :				List[str]		=			hidden_act
							SCREAMING_SNAKE_CASE :				Union[str, Any]		=			use_absolute_embeddings
							SCREAMING_SNAKE_CASE :				Tuple		=			layer_norm_eps
							SCREAMING_SNAKE_CASE :				Optional[Any]		=			initializer_range
							# we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
							# this indicates the channel dimension after the last stage of the model
							SCREAMING_SNAKE_CASE :				str		=			int(embed_dim * 2 ** (len(lowerCamelCase_						) - 1)						)



