

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


lowercase_             =     logging.get_logger(__name__)

lowercase_             =     {
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}





class 				__lowerCAmelCase  (      lowercase_    ,    lowercase_		):
  _a		    =						'''convnextv2'''




  def __init__(       self							,     lowerCAmelCase=3							,     lowerCAmelCase=4							,     lowerCAmelCase=4							,     lowerCAmelCase=None							,     lowerCAmelCase=None							,     lowerCAmelCase="gelu"							,     lowerCAmelCase=0.02							,     lowerCAmelCase=1e-12							,     lowerCAmelCase=0.0							,     lowerCAmelCase=224							,     lowerCAmelCase=None							,     lowerCAmelCase=None							,     **lowerCAmelCase							,     )						->				Tuple:
        '''simple docstring'''






        super().__init__(**lowerCAmelCase      )

        _lowercase			 =num_channels
        _lowercase			 =patch_size
        _lowercase			 =num_stages
        _lowercase			 =[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
        _lowercase			 =[3, 3, 9, 3] if depths is None else depths
        _lowercase			 =hidden_act
        _lowercase			 =initializer_range
        _lowercase			 =layer_norm_eps
        _lowercase			 =drop_path_rate
        _lowercase			 =image_size
        _lowercase			 =['stem'] + [F'''stage{idx}''' for idx in range(1							,     len(self.depths      ) + 1      )]
        _lowercase , _lowercase			 =get_aligned_output_features_output_indices(
            out_features=lowerCAmelCase							,     out_indices=lowerCAmelCase							,     stage_names=self.stage_names      )





from math import pow, sqrt
def   a   (    *A__			:     float  )					->   bool:





      """simple docstring"""



      _lowercase			 =len(A__  ) > 0 and all(value > 0.0 for value in values  )
      return result
def   a   (    A__			:     float   ,     A__			:     float  )					->   float | ValueError:





      """simple docstring"""



      return (
          round(sqrt(molar_mass_a / molar_mass_a  )   ,     6  )
          if validate(A__   ,     A__  )
          else ValueError('Input Error: Molar mass values must greater than 0.'  )
      )
def   a   (    A__			:     float   ,     A__			:     float   ,     A__			:     float  )					->   float | ValueError:





      """simple docstring"""



      return (
          round(effusion_rate * sqrt(molar_mass_a / molar_mass_a  )   ,     6  )
          if validate(A__   ,     A__   ,     A__  )
          else ValueError(
              'Input Error: Molar mass and effusion rate values must greater than 0.'  )
      )
def   a   (    A__			:     float   ,     A__			:     float   ,     A__			:     float  )					->   float | ValueError:





      """simple docstring"""



      return (
          round(effusion_rate / sqrt(molar_mass_a / molar_mass_a  )   ,     6  )
          if validate(A__   ,     A__   ,     A__  )
          else ValueError(
              'Input Error: Molar mass and effusion rate values must greater than 0.'  )
      )
def   a   (    A__			:     float   ,     A__			:     float   ,     A__			:     float  )					->   float | ValueError:





      """simple docstring"""



      return (
          round(molar_mass / pow(effusion_rate_a / effusion_rate_a   ,     2  )   ,     6  )
          if validate(A__   ,     A__   ,     A__  )
          else ValueError(
              'Input Error: Molar mass and effusion rate values must greater than 0.'  )
      )







def   a   (    A__			:     float   ,     A__			:     float   ,     A__			:     float  )					->   float | ValueError:





      """simple docstring"""



      return (
          round(pow(effusion_rate_a / effusion_rate_a   ,     2  ) / molar_mass   ,     6  )
          if validate(A__   ,     A__   ,     A__  )
          else ValueError(
              'Input Error: Molar mass and effusion rate values must greater than 0.'  )
      )


