





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


__lowerCamelCase       :     Dict   =     logging.get_logger(__name__)

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



class 					A__   (       __a       ,   __a			):
      _UpperCAmelCase	:Union[str, Any]						    =   """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_=224       ,							A_=None       ,							A_=None       ,							**A_       ,							):
       '''simple docstring'''




       super().__init__(**A_   )

       UpperCamelCase	:					Optional[int]       	=   num_channels
       UpperCamelCase	:					Optional[int]       	=   patch_size
       UpperCamelCase	:					Union[str, Any]       	=   num_stages
       UpperCamelCase	:					str       	=   [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
       UpperCamelCase	:					Any       	=   [3, 3, 9, 3] if depths is None else depths
       UpperCamelCase	:					Any       	=   hidden_act
       UpperCamelCase	:					Tuple       	=   initializer_range
       UpperCamelCase	:					Any       	=   layer_norm_eps
       UpperCamelCase	:					Tuple       	=   drop_path_rate
       UpperCamelCase	:					List[str]       	=   image_size
       UpperCamelCase	:					str       	=   ["stem"] + [F"""stage{idx}""" for idx in range(1       ,							len(self.depths   ) + 1   )]
       UpperCamelCase	,    UpperCamelCase	:					Union[str, Any]       	=   get_aligned_output_features_output_indices(
           out_features=A_       ,							out_indices=A_       ,							stage_names=self.stage_names   )






'''simple docstring'''







from datetime import datetime

import requests
from bsa import BeautifulSoup

if __name__ == "__main__":
   A     =input('Enter image url: ').strip()
   print(f"""Downloading image from {url} ...""")
   A     =BeautifulSoup(requests.get(url).content, 'html.parser')
   # The image URL is in the content field of the first meta tag with property og:image
   A     =soup.find('meta', {'property': 'og:image'})['content']
   A     =requests.get(image_url).content
   A     =f"""{datetime.now():%Y-%m-%d_%H:%M:%S}.jpg"""
   with open(file_name, 'wb') as fp:
      fp.write(image_data)
   print(f"""Done. Image saved to disk as {file_name}.""")




