
'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

from packaging import version

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


a_     =  logging.get_logger(__name__)

a_     =  {
    "facebook/convnext-tiny-224": "https://huggingface.co/facebook/convnext-tiny-224/resolve/main/config.json",
    # See all ConvNeXT models at https://huggingface.co/models?filter=convnext
}






class 				UpperCAmelCase_			(		snake_case__      ,  snake_case__   ):
 UpperCAmelCase_						      =  """convnext"""





 def __init__(      self	,    lowercase_=3	,    lowercase_=4	,    lowercase_=4	,    lowercase_=None	,    lowercase_=None	,    lowercase_="gelu"	,    lowercase_=0.02	,    lowercase_=1E-12	,    lowercase_=1E-6	,    lowercase_=0.0	,    lowercase_=2_24	,    lowercase_=None	,    lowercase_=None	,    **lowercase_	,    ):
     super().__init__(**lowercase_)

     snake_case_	:      Any            =  num_channels
     snake_case_	:      Optional[int]            =  patch_size
     snake_case_	:      Any            =  num_stages
     snake_case_	:      str            =  [96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
     snake_case_	:      Optional[int]            =  [3, 3, 9, 3] if depths is None else depths
     snake_case_	:      Dict            =  hidden_act
     snake_case_	:      Optional[int]            =  initializer_range
     snake_case_	:      List[str]            =  layer_norm_eps
     snake_case_	:      Optional[int]            =  layer_scale_init_value
     snake_case_	:      Tuple            =  drop_path_rate
     snake_case_	:      Dict            =  image_size
     snake_case_	:      Optional[int]            =  ["stem"] + [F'stage{idx}' for idx in range(1	,    len(self.depths) + 1)]
     snake_case_     ,	snake_case_	:      Optional[Any]            =  get_aligned_output_features_output_indices(
         out_features=lowercase_	,    out_indices=lowercase_	,    stage_names=self.stage_names)






class 				UpperCAmelCase_			(		snake_case__   ):
 UpperCAmelCase_						      =  version.parse("""1.11"""   )





 @property
 def     snake_case__						(      self):
     return OrderedDict(
         [
             ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
         ])





 @property
 def     snake_case__						(      self):
     return 1E-5






'''simple docstring'''
from math import exp

def   UpperCamelCase_       (		__SCREAMING_SNAKE_CASE    ):
    """simple docstring"""






    return 8 * x - 2 * exp(-x    )

def   UpperCamelCase_       (		__SCREAMING_SNAKE_CASE,						__SCREAMING_SNAKE_CASE,						__SCREAMING_SNAKE_CASE    ):
    """simple docstring"""






    snake_case_	:      Optional[Any]            =  lower_bound
    snake_case_	:      int            =  upper_bound
    for _ in range(0,						__SCREAMING_SNAKE_CASE    ):
        snake_case_     ,	snake_case_	:      List[str]            =  xa, xa - (f(__SCREAMING_SNAKE_CASE    ) * (xa - xa)) / (f(__SCREAMING_SNAKE_CASE    ) - f(__SCREAMING_SNAKE_CASE    ))
    return xa


if __name__ == "__main__":
  print(f"""Example: {secant_method(1, 3, 2)}""")




