code: 
  
  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
  
  
  lowerCamelCase     =      logging.get_logger(__name__)
  
  lowerCamelCase     =      {
      '''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 		__magic_name__    (							lowerCamelCase__	, lowerCamelCase__							):
  
     '''simple docstring'''
  
  
  
  
     lowerCamelCase__				:			Union[str, Any]												=     '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_=224,					lowercase_=None,					lowercase_=None,					**lowercase_,					)							->					List[str]:
  
  
  
  
  
  
       """simple docstring"""
  
  
  
  
  
  
       super().__init__(**lowercase_ )
  
       a__						=num_channels
       a__						=patch_size
       a__						=num_stages
       a__						=[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
       a__						=[3, 3, 9, 3] if depths is None else depths
       a__						=hidden_act
       a__						=initializer_range
       a__						=layer_norm_eps
       a__						=layer_scale_init_value
       a__						=drop_path_rate
       a__						=image_size
       a__						=['''stem'''] + [F"""stage{idx}""" for idx in range(1,					len(self.depths ) + 1 )]
       a__,   a__						=get_aligned_output_features_output_indices(
           out_features=lowercase_,					out_indices=lowercase_,					stage_names=self.stage_names )
  
  
  
  
  
  
  
  class 		__magic_name__    (							lowerCamelCase__							):
  
     '''simple docstring'''
  
  
  
  
     lowerCamelCase__				:			Tuple												=     version.parse('1.11'							)
  
  
  
     @property
     def 				_UpperCAmelCase				(       self )							->					Mapping[str, Mapping[int, str]]:
  
  
  
  
  
  
       """simple docstring"""
  
  
  
  
  
  
       return OrderedDict(
           [
               ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
           ] )
  
  
  
     @property
     def 				_UpperCAmelCase				(       self )							->					float:
  
  
  
  
  
  
       """simple docstring"""
  
  
  
  
  
  
       return 1E-5
  
style_context: 
  
  from dataclasses import dataclass
  from typing import List, Optional, Union
  
  import numpy as np
  import PIL
  from PIL import Image
  
  from ...utils import BaseOutput, is_torch_available, is_transformers_available
  
  
  
  
  
  
  
  @dataclass
  # Copied from diffusers.pipelines.stable_diffusion.__init__.StableDiffusionPipelineOutput with Stable->Alt
  class 		__magic_name__    (							lowerCamelCase__							):
  
     '''simple docstring'''
  
  
  
  
     lowerCamelCase__				:			Union[List[PIL.Image.Image], np.ndarray]
     lowerCamelCase__				:			Optional[List[bool]]
  
  
  if is_transformers_available() and is_torch_available():
         from .modeling_roberta_series import RobertaSeriesModelWithTransformation
         from .pipeline_alt_diffusion import AltDiffusionPipeline
         from .pipeline_alt_diffusion_imgaimg import AltDiffusionImgaImgPipeline
  