




'''simple docstring'''


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


_lowerCAmelCase  		=      logging.get_logger(__name__)

_lowerCAmelCase  		=      {
    'funnel-transformer/small': 'https://huggingface.co/funnel-transformer/small/resolve/main/config.json',
    'funnel-transformer/small-base': 'https://huggingface.co/funnel-transformer/small-base/resolve/main/config.json',
    'funnel-transformer/medium': 'https://huggingface.co/funnel-transformer/medium/resolve/main/config.json',
    'funnel-transformer/medium-base': 'https://huggingface.co/funnel-transformer/medium-base/resolve/main/config.json',
    'funnel-transformer/intermediate': (
        'https://huggingface.co/funnel-transformer/intermediate/resolve/main/config.json'
    ),
    'funnel-transformer/intermediate-base': (
        'https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/config.json'
    ),
    'funnel-transformer/large': 'https://huggingface.co/funnel-transformer/large/resolve/main/config.json',
    'funnel-transformer/large-base': 'https://huggingface.co/funnel-transformer/large-base/resolve/main/config.json',
    'funnel-transformer/xlarge': 'https://huggingface.co/funnel-transformer/xlarge/resolve/main/config.json',
    'funnel-transformer/xlarge-base': 'https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/config.json',
}
class   __A (							_SCREAMING_SNAKE_CASE  ):



   """simple docstring"""







   A_												=				'funnel'
   A_												=				{
       'hidden_size': 'd_model',
       'num_attention_heads': 'n_head',
   }

   def __init__(      self				, _lowerCamelCase=3_0_5_2_2				, _lowerCamelCase=[4, 4, 4]				, _lowerCamelCase=None				, _lowerCamelCase=2				, _lowerCamelCase=7_6_8				, _lowerCamelCase=1_2				, _lowerCamelCase=6_4				, _lowerCamelCase=3_0_7_2				, _lowerCamelCase="gelu_new"				, _lowerCamelCase=0.1				, _lowerCamelCase=0.1				, _lowerCamelCase=0.0				, _lowerCamelCase=0.1				, _lowerCamelCase=None				, _lowerCamelCase=1e-9				, _lowerCamelCase="mean"				, _lowerCamelCase="relative_shift"				, _lowerCamelCase=True				, _lowerCamelCase=True				, _lowerCamelCase=True				, **_lowerCamelCase				, )->       Tuple:
      lowercase__       							=							vocab_size
      lowercase__       							=							block_sizes
      lowercase__       							=							[1] * len(_lowerCAmelCase						) if block_repeats is None else block_repeats
      assert len(_lowerCAmelCase						) == len(
          self.block_repeats						), "`block_sizes` and `block_repeats` should have the same length."
      lowercase__       							=							num_decoder_layers
      lowercase__       							=							d_model
      lowercase__       							=							n_head
      lowercase__       							=							d_head
      lowercase__       							=							d_inner
      lowercase__       							=							hidden_act
      lowercase__       							=							hidden_dropout
      lowercase__       							=							attention_dropout
      lowercase__       							=							activation_dropout
      lowercase__       							=							initializer_range
      lowercase__       							=							initializer_std
      lowercase__       							=							layer_norm_eps
      assert pooling_type in [
          "mean",
          "max",
      ], f'''Got {pooling_type} for `pooling_type` but only \'mean\' and \'max\' are supported.'''
      lowercase__       							=							pooling_type
      assert attention_type in [
          "relative_shift",
          "factorized",
      ], f'''Got {attention_type} for `attention_type` but only \'relative_shift\' and \'factorized\' are supported.'''
      lowercase__       							=							attention_type
      lowercase__       							=							separate_cls
      lowercase__       							=							truncate_seq
      lowercase__       							=							pool_q_only

      super().__init__(**_lowerCAmelCase						)

   @property
   def snake_case_(      self						)->       Tuple:
      return sum(self.block_sizes						)

   @num_hidden_layers.setter
   def snake_case_(      self				, _lowerCamelCase						)->       Optional[int]:
      raise NotImplementedError(
          '''This model does not support the setting of `num_hidden_layers`. Please set `block_sizes`.'''						)

   @property
   def snake_case_(      self						)->       Any:
      return len(self.block_sizes						)

   @num_blocks.setter
   def snake_case_(      self				, _lowerCamelCase						)->       List[Any]:
      raise NotImplementedError('''This model does not support the setting of `num_blocks`. Please set `block_sizes`.'''						)










import operator as op

def    UpperCAmelCase_				( __UpperCAmelCase		:      str				)   ->					Any:
      SCREAMING_SNAKE_CASE_      		=     []
      SCREAMING_SNAKE_CASE_      		=     lambda __UpperCAmelCase     ,     __UpperCAmelCase				: int(x / y				)  # noqa: E731 integer division operation
      SCREAMING_SNAKE_CASE_      		=     {
          '^': op.pow,
          '*': op.mul,
          '/': div,
          '+': op.add,
          '-': op.sub,
      }  # operators & their respective operation

      # print table header
      print('Symbol'.center(8				)     ,     'Action'.center(12				)     ,     'Stack'     ,     sep=' | '				)
      print('-' * (30 + len(__UpperCAmelCase				))				)

      for x in post_fix:
            if x.isdigit():  # if x in digit
                  stack.append(__UpperCAmelCase				)  # append x to stack
                  # output in tabular format
                  print(x.rjust(8				)     ,     ('push(' + x + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)
            else:
                  SCREAMING_SNAKE_CASE_      		=     stack.pop()  # pop stack
                  # output in tabular format
                  print(''.rjust(8				)     ,     ('pop(' + b + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)

                  SCREAMING_SNAKE_CASE_      		=     stack.pop()  # pop stack
                  # output in tabular format
                  print(''.rjust(8				)     ,     ('pop(' + a + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '				)

                  stack.append(
                      str(opr[x](int(__UpperCAmelCase				)     ,     int(__UpperCAmelCase				)				)				)				)  # evaluate the 2 values popped from stack & push result to stack
                  # output in tabular format
                  print(
                      x.rjust(8				)     ,     ('push(' + a + x + b + ')').ljust(12				)     ,     ','.join(__UpperCAmelCase				)     ,     sep=' | '     ,     )

      return int(stack[0]				)


if __name__ == "__main__":
   lowerCamelCase__					:  Tuple      							=				input('\n\nEnter a Postfix Equation (space separated) = ').split(' ')
   print('\n\tResult = ', solve(Postfix))