"""simple docstring"""






import os



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  Union[str, Any]:
   lowercase__:   int					=      len(grid[0] )
   lowercase__:   Tuple					=      len(__UpperCAmelCase )

   lowercase__:   Any					=      0
   lowercase__:   Union[str, Any]					=      0
   lowercase__:   Dict					=      0

   # Check vertically, horizontally, diagonally at the same time (only works
   # for nxn grid)
   for i in range(__UpperCAmelCase ):
      for j in range(n_rows - 3 ):
         lowercase__:   Any					=      grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
         lowercase__:   List[str]					=      grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

         # Left-to-right diagonal (\) product
         if i < n_columns - 3:
            lowercase__:   Optional[Any]					=      (
                grid[i][j]
                * grid[i + 1][j + 1]
                * grid[i + 2][j + 2]
                * grid[i + 3][j + 3]
            )

         # Right-to-left diagonal(/) product
         if i > 2:
            lowercase__:   int					=      (
                grid[i][j]
                * grid[i - 1][j + 1]
                * grid[i - 2][j + 2]
                * grid[i - 3][j + 3]
            )

         lowercase__:   Optional[int]					=      max(
             __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )
         if max_product > largest:
            lowercase__:   Tuple					=      max_product

   return largest



def SCREAMING_SNAKE_CASE__			(   )  ->  Optional[Any]:
   lowercase__:   Union[str, Any]					=      []
   with open(os.path.dirname(__UpperCAmelCase ) + '''/grid.txt''' ) as file:
      for line in file:
         grid.append(line.strip('''\n''' ).split(''' ''' ) )

   lowercase__:   Dict					=      [[int(__UpperCAmelCase ) for i in grid[j]] for j in range(len(__UpperCAmelCase ) )]

   return largest_product(__UpperCAmelCase )


if __name__ == "__main__":
       print(solution())

"""simple docstring"""






from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A			   = logging.get_logger(__name__)

__A			   = {
    "snap-research/efficientformer-l1-300": (
        "https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"
    ),
}


class     UpperCAmelCase						(_UpperCAmelCase  ):



    """simple docstring"""

    _UpperCAmelCase	:Optional[Any]						    = "efficientformer"






    def __init__(   self    ,			_UpperCAmelCase = [3, 2, 6, 4]    ,			_UpperCAmelCase = [48, 96, 224, 448]    ,			_UpperCAmelCase = [True, True, True, True]    ,			_UpperCAmelCase = 448    ,			_UpperCAmelCase = 32    ,			_UpperCAmelCase = 4    ,			_UpperCAmelCase = 7    ,			_UpperCAmelCase = 5    ,			_UpperCAmelCase = 8    ,			_UpperCAmelCase = 4    ,			_UpperCAmelCase = 0.0    ,			_UpperCAmelCase = 16    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 2    ,			_UpperCAmelCase = 1    ,			_UpperCAmelCase = 0.0    ,			_UpperCAmelCase = 1    ,			_UpperCAmelCase = True    ,			_UpperCAmelCase = True    ,			_UpperCAmelCase = 1e-5    ,			_UpperCAmelCase = "gelu"    ,			_UpperCAmelCase = 0.02    ,			_UpperCAmelCase = 1e-1_2    ,			_UpperCAmelCase = 224    ,			_UpperCAmelCase = 1e-0_5    ,			**_UpperCAmelCase    ,			):
       super().__init__(**_UpperCAmelCase							)

       lowercase__:   List[str]					=      hidden_act
       lowercase__:   Union[str, Any]					=      hidden_dropout_prob
       lowercase__:   Union[str, Any]					=      hidden_sizes
       lowercase__:   Any					=      num_hidden_layers
       lowercase__:   int					=      num_attention_heads
       lowercase__:   Dict					=      initializer_range
       lowercase__:   Optional[int]					=      layer_norm_eps
       lowercase__:   int					=      patch_size
       lowercase__:   int					=      num_channels
       lowercase__:   str					=      depths
       lowercase__:   List[str]					=      mlp_expansion_ratio
       lowercase__:   List[str]					=      downsamples
       lowercase__:   List[str]					=      dim
       lowercase__:   Optional[Any]					=      key_dim
       lowercase__:   Union[str, Any]					=      attention_ratio
       lowercase__:   Any					=      resolution
       lowercase__:   Any					=      pool_size
       lowercase__:   List[Any]					=      downsample_patch_size
       lowercase__:   Optional[int]					=      downsample_stride
       lowercase__:   Union[str, Any]					=      downsample_pad
       lowercase__:   List[Any]					=      drop_path_rate
       lowercase__:   Optional[Any]					=      num_metaad_blocks
       lowercase__:   Any					=      distillation
       lowercase__:   Optional[int]					=      use_layer_scale
       lowercase__:   List[str]					=      layer_scale_init_value
       lowercase__:   Dict					=      image_size
       lowercase__:   List[str]					=      batch_norm_eps
