


from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


snake_case							:	str					      =				logging.get_logger(__name__)

snake_case							:	Optional[Any]					      =				{
    '''microsoft/focalnet-tiny''': '''https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json''',
}







class 	snake_case_       (lowerCamelCase_     ,						lowerCamelCase_				):
					UpperCAmelCase__ :   Dict   				=      '''focalnet'''
					def __init__(				self       :Tuple      ,__snake_case       :Tuple=2_24      ,__snake_case       :str=4      ,__snake_case       :str=3      ,__snake_case       :Tuple=96      ,__snake_case       :Optional[int]=False      ,__snake_case       :int=[1_92, 3_84, 7_68, 7_68]      ,__snake_case       :Any=[2, 2, 6, 2]      ,__snake_case       :Union[str, Any]=[2, 2, 2, 2]      ,__snake_case       :Union[str, Any]=[3, 3, 3, 3]      ,__snake_case       :Union[str, Any]="gelu"      ,__snake_case       :Any=4.0      ,__snake_case       :str=0.0      ,__snake_case       :int=0.1      ,__snake_case       :Optional[Any]=False      ,__snake_case       :Dict=1E-4      ,__snake_case       :Any=False      ,__snake_case       :List[str]=False      ,__snake_case       :Optional[Any]=False      ,__snake_case       :Optional[Any]=0.02      ,__snake_case       :Optional[int]=1E-5      ,__snake_case       :str=32      ,__snake_case       :Union[str, Any]=None      ,__snake_case       :int=None      ,**__snake_case       :str      ,) ->   Dict:
												super().__init__(**__snake_case				)

												a__					=					image_size
												a__					=					patch_size
												a__					=					num_channels
												a__					=					embed_dim
												a__					=					use_conv_embed
												a__					=					hidden_sizes
												a__					=					depths
												a__					=					focal_levels
												a__					=					focal_windows
												a__					=					hidden_act
												a__					=					mlp_ratio
												a__					=					hidden_dropout_prob
												a__					=					drop_path_rate
												a__					=					use_layerscale
												a__					=					layerscale_value
												a__					=					use_post_layernorm
												a__					=					use_post_layernorm_in_modulation
												a__					=					normalize_modulator
												a__					=					initializer_range
												a__					=					layer_norm_eps
												a__					=					encoder_stride
												a__					=					['stem'] + [F'stage{idx}' for idx in range(1      ,len(self.depths				) + 1				)]
												a__				, a__					=					get_aligned_output_features_output_indices(
												    out_features=__snake_case      ,out_indices=__snake_case      ,stage_names=self.stage_names				)








from math import ceil, sqrt






def 							__lowercase       (			__lowerCAmelCase							:    int = 1_0_0_0_0_0_0       ):
							a__					=					0

							for outer_width in range(3 ,   (limit // 4) + 2       ):
														if outer_width**2 > limit:
																					a__					=					max(ceil(sqrt(outer_width**2 - limit       )       ) ,   1       )
														else:
																					a__					=					1
														if (outer_width - hole_width_lower_bound) % 2:
																					hole_width_lower_bound += 1

														answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

							return answer


if __name__ == "__main__":
						print(f"""{solution() = }""")




