


'''simple docstring'''







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


a__  :					str        =       logging.get_logger(__name__)

a__  :					Optional[int]        =       {
    'facebook/convnextv2-tiny-1k-224': 'https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json',
}
class 					lowercase_     (    a__  ,						a__   ):
    __UpperCAmelCase   			=	'convnextv2'


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

          UpperCamelCase__										=				num_channels
          UpperCamelCase__										=				patch_size
          UpperCamelCase__										=				num_stages
          UpperCamelCase__										=				[96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
          UpperCamelCase__										=				[3, 3, 9, 3] if depths is None else depths
          UpperCamelCase__										=				hidden_act
          UpperCamelCase__										=				initializer_range
          UpperCamelCase__										=				layer_norm_eps
          UpperCamelCase__										=				drop_path_rate
          UpperCamelCase__										=				image_size
          UpperCamelCase__										=				["stem"] + [f'''stage{idx}''' for idx in range(1  ,					len(self.depths    ) + 1    )]
          UpperCamelCase__					,	UpperCamelCase__										=				get_aligned_output_features_output_indices(
              out_features=a  ,					out_indices=a  ,					stage_names=self.stage_names    )










'''simple docstring'''





_UpperCamelCase											=						tuple[float, float, float]
_UpperCamelCase											=						tuple[float, float, float]

def        a_     (							_lowerCAmelCase       ,_lowerCAmelCase       )      ->      Vectorad:
  __lowerCamelCase       :       Any           = end_pointa[0] - end_pointa[0]
  __lowerCamelCase       :       str           = end_pointa[1] - end_pointa[1]
  __lowerCamelCase       :       Tuple           = end_pointa[2] - end_pointa[2]
  return (x, y, z)

def        a_     (							_lowerCAmelCase       ,_lowerCAmelCase       )      ->      Vectorad:
  __lowerCamelCase       :       List[str]           = ab[1] * ac[2] - ab[2] * ac[1]  # *i
  __lowerCamelCase       :       Dict           = (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
  __lowerCamelCase       :       List[Any]           = ab[0] * ac[1] - ab[1] * ac[0]  # *k
  return (x, y, z)

def        a_     (							_lowerCAmelCase       ,_lowerCAmelCase       )      ->      bool:
  return tuple(round(_lowerCAmelCase       ,_lowerCAmelCase       ) for x in vector       ) == (0, 0, 0)


def        a_     (							_lowerCAmelCase       ,_lowerCAmelCase       ,_lowerCAmelCase       ,_lowerCAmelCase = 10       )      ->      bool:
  __lowerCamelCase       :       str           = create_vector(_lowerCAmelCase       ,_lowerCAmelCase       )
  __lowerCamelCase       :       Dict           = create_vector(_lowerCAmelCase       ,_lowerCAmelCase       )
  return is_zero_vector(get_ad_vectors_cross(_lowerCAmelCase       ,_lowerCAmelCase       )       ,_lowerCAmelCase       )






