

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_             =     {
    'microsoft/focalnet-tiny': 'https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json',
}





class 				__lowerCAmelCase  (      SCREAMING_SNAKE_CASE    ,    SCREAMING_SNAKE_CASE							):
  _a		    =						"""focalnet"""




  def __init__(       self							,     lowerCAmelCase=224							,     lowerCAmelCase=4							,     lowerCAmelCase=3							,     lowerCAmelCase=96							,     lowerCAmelCase=False							,     lowerCAmelCase=[192, 384, 768, 768]							,     lowerCAmelCase=[2, 2, 6, 2]							,     lowerCAmelCase=[2, 2, 2, 2]							,     lowerCAmelCase=[3, 3, 3, 3]							,     lowerCAmelCase="gelu"							,     lowerCAmelCase=4.0							,     lowerCAmelCase=0.0							,     lowerCAmelCase=0.1							,     lowerCAmelCase=False							,     lowerCAmelCase=1e-4							,     lowerCAmelCase=False							,     lowerCAmelCase=False							,     lowerCAmelCase=False							,     lowerCAmelCase=0.02							,     lowerCAmelCase=1e-5							,     lowerCAmelCase=32							,     lowerCAmelCase=None							,     lowerCAmelCase=None							,     **lowerCAmelCase							,     )						->				Optional[Any]:
        '''simple docstring'''






        super().__init__(**lowerCAmelCase      )

        _lowercase			 =image_size
        _lowercase			 =patch_size
        _lowercase			 =num_channels
        _lowercase			 =embed_dim
        _lowercase			 =use_conv_embed
        _lowercase			 =hidden_sizes
        _lowercase			 =depths
        _lowercase			 =focal_levels
        _lowercase			 =focal_windows
        _lowercase			 =hidden_act
        _lowercase			 =mlp_ratio
        _lowercase			 =hidden_dropout_prob
        _lowercase			 =drop_path_rate
        _lowercase			 =use_layerscale
        _lowercase			 =layerscale_value
        _lowercase			 =use_post_layernorm
        _lowercase			 =use_post_layernorm_in_modulation
        _lowercase			 =normalize_modulator
        _lowercase			 =initializer_range
        _lowercase			 =layer_norm_eps
        _lowercase			 =encoder_stride
        _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      )





import requests

lowercase_             =     'YOUR API KEY'
def   a   (    A__			:     str   ,     A__			:     str = giphy_api_key  )					->   list:





      """simple docstring"""



      _lowercase			 ='+'.join(query.split()  )
      _lowercase			 =F'''https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}'''
      _lowercase			 =requests.get(A__  ).json()['data']
      return [gif["url"] for gif in gifs]


if __name__ == "__main__":
  print('\n'.join(get_gifs('space ship')))


