

'''simple docstring'''






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


lowerCAmelCase__											=	logging.get_logger(__name__)

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






class 			lowercase_	(lowerCamelCase__				,       lowerCamelCase__      ):




  """simple docstring"""




  SCREAMING_SNAKE_CASE    :  List[str]							=			'convnextv2'






  def __init__(      self   :     Tuple					,lowercase__   :     Dict=3					,lowercase__   :     int=4					,lowercase__   :     Optional[int]=4					,lowercase__   :     Optional[Any]=None					,lowercase__   :     List[str]=None					,lowercase__   :     Tuple="gelu"					,lowercase__   :     Dict=0.0_2					,lowercase__   :     List[Any]=1e-1_2					,lowercase__   :     Optional[int]=0.0					,lowercase__   :     int=2_2_4					,lowercase__   :     int=None					,lowercase__   :     Tuple=None					,**lowercase__   :     List[str]					,):
   super().__init__(**lowercase__			)

   __lowercase							  = num_channels
   __lowercase							  = patch_size
   __lowercase							  = num_stages
   __lowercase							  = [9_6, 1_9_2, 3_8_4, 7_6_8] 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=lowercase__					,out_indices=lowercase__					,stage_names=self.stage_names			)




'''simple docstring'''






from __future__ import annotations


def 		_A     (    A__      ):






 """simple docstring"""



 __lowercase							  = len(A__      )
 # We need to create solution object to save path.
 __lowercase							  = [[0 for _ in range(A__      )] for _ in range(A__      )]
 __lowercase							  = run_maze(A__     ,				0     ,				0     ,				A__      )
 if solved:
  print('''\n'''.join(str(A__      ) for row in solutions      )      )
 else:
  print('''No solution exists!'''      )
 return solved


def 		_A     (    A__     ,				A__     ,				A__     ,				A__      ):






 """simple docstring"""



 __lowercase							  = len(A__      )
 # Final check point.
 if i == j == (size - 1):
  __lowercase							  = 1
  return True

 __lowercase							  = (not i < 0) and (not j < 0)  # Check lower bounds
 __lowercase							  = (i < size) and (j < size)  # Check upper bounds

 if lower_flag and upper_flag:
  # check for already visited and block points.
  __lowercase							  = (not solutions[i][j]) and (not maze[i][j])
  if block_flag:
   # check visited
   __lowercase							  = 1

   # check for directions
   if (
       run_maze(A__     ,				i + 1     ,				A__     ,				A__      )
       or run_maze(A__     ,				A__     ,				j + 1     ,				A__      )
       or run_maze(A__     ,				i - 1     ,				A__     ,				A__      )
       or run_maze(A__     ,				A__     ,				j - 1     ,				A__      )
   ):
    return True

   __lowercase							  = 0
   return False
 return False


if __name__ == "__main__":
 import doctest

 doctest.testmod()

