



import collections.abc
from typing import Optional, Tuple, Union

import torch
import torch.utils.checkpoint
from torch import nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from ...activations import ACTaFN
from ...modeling_outputs import BaseModelOutputWithNoAttention, ImageClassifierOutputWithNoAttention
from ...modeling_utils import PreTrainedModel
from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
from .configuration_poolformer import PoolFormerConfig


__UpperCAmelCase          =       logging.get_logger(__name__)

# General docstring
__UpperCAmelCase          =       '''PoolFormerConfig'''

# Base docstring
__UpperCAmelCase          =       '''sail/poolformer_s12'''
__UpperCAmelCase          =       [1, 512, 7, 7]

# Image classification docstring
__UpperCAmelCase          =       '''sail/poolformer_s12'''
__UpperCAmelCase          =       '''tabby, tabby cat'''

__UpperCAmelCase          =       [
    '''sail/poolformer_s12''',
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
]
def 		UpperCamelCase	(   snake_case__       :    Optional[int]       ,     snake_case__       :    float = 0.0       ,     snake_case__       :    bool = False	)	->     str:
   if drop_prob == 0.0 or not training:
      return input
   UpperCamelCase    :  Tuple							=	1 - drop_prob
   UpperCamelCase    :  Tuple							=	(input.shape[0],) + (1,) * (input.ndim - 1)  # work with diff dim tensors, not just 2D ConvNets
   UpperCamelCase    :  Optional[Any]							=	keep_prob + torch.rand(snake_case__       ,     dtype=input.dtype       ,     device=input.device	)
   random_tensor.floor_()  # binarize
   UpperCamelCase    :  List[str]							=	input.div(snake_case__	) * random_tensor
   return output



class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_ = None       )     ->		None:
          super().__init__()
          UpperCamelCase    :  str							=	drop_prob
       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		torch.Tensor:
          return drop_path(SCREAMING_SNAKE_CASE_,			self.drop_prob,			self.training       )






       def 					snake_case_       (			self       )     ->		str:
          return "p={}".format(self.drop_prob       )






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_=None       )     ->		Tuple:
          super().__init__()
          UpperCamelCase    :  str							=	patch_size if isinstance(SCREAMING_SNAKE_CASE_,			collections.abc.Iterable       ) else (patch_size, patch_size)
          UpperCamelCase    :  int							=	stride if isinstance(SCREAMING_SNAKE_CASE_,			collections.abc.Iterable       ) else (stride, stride)
          UpperCamelCase    :  Optional[Any]							=	padding if isinstance(SCREAMING_SNAKE_CASE_,			collections.abc.Iterable       ) else (padding, padding)

          UpperCamelCase    :  List[Any]							=	nn.Convad(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			kernel_size=SCREAMING_SNAKE_CASE_,			stride=SCREAMING_SNAKE_CASE_,			padding=SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Any							=	norm_layer(SCREAMING_SNAKE_CASE_       ) if norm_layer else nn.Identity()






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		int:
          UpperCamelCase    :  List[str]							=	self.projection(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Union[str, Any]							=	self.norm(SCREAMING_SNAKE_CASE_       )
          return embeddings






class 				lowerCAmelCase_		(  nn.GroupNorm							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_,			**SCREAMING_SNAKE_CASE_       )     ->		int:
          super().__init__(1,			SCREAMING_SNAKE_CASE_,			**SCREAMING_SNAKE_CASE_       )






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_       )     ->		str:
          super().__init__()
          UpperCamelCase    :  List[str]							=	nn.AvgPoolad(SCREAMING_SNAKE_CASE_,			stride=1,			padding=pool_size // 2,			count_include_pad=SCREAMING_SNAKE_CASE_       )






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		Optional[Any]:
          return self.pool(SCREAMING_SNAKE_CASE_       ) - hidden_states






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       )     ->		List[Any]:
          super().__init__()
          UpperCamelCase    :  Union[str, Any]							=	nn.Convad(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			1       )
          UpperCamelCase    :  List[str]							=	nn.Convad(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			1       )
          UpperCamelCase    :  Any							=	PoolFormerDropPath(SCREAMING_SNAKE_CASE_       )
          if isinstance(config.hidden_act,			SCREAMING_SNAKE_CASE_       ):
             UpperCamelCase    :  Optional[Any]							=	ACTaFN[config.hidden_act]
          else:
             UpperCamelCase    :  Any							=	config.hidden_act






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		str:
          UpperCamelCase    :  Any							=	self.conva(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  str							=	self.act_fn(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  List[Any]							=	self.drop(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  str							=	self.conva(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Optional[int]							=	self.drop(SCREAMING_SNAKE_CASE_       )

          return hidden_states






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       )     ->		Tuple:
          super().__init__()
          UpperCamelCase    :  Optional[Any]							=	PoolFormerPooling(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Union[str, Any]							=	PoolFormerOutput(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  List[str]							=	PoolFormerGroupNorm(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Tuple							=	PoolFormerGroupNorm(SCREAMING_SNAKE_CASE_       )

          # Useful for training neural nets
          UpperCamelCase    :  Union[str, Any]							=	PoolFormerDropPath(SCREAMING_SNAKE_CASE_       ) if drop_path > 0.0 else nn.Identity()
          UpperCamelCase    :  List[str]							=	config.use_layer_scale
          if config.use_layer_scale:
             UpperCamelCase    :  int							=	nn.Parameter(
                 config.layer_scale_init_value * torch.ones((SCREAMING_SNAKE_CASE_)       ),			requires_grad=SCREAMING_SNAKE_CASE_       )
             UpperCamelCase    :  Optional[Any]							=	nn.Parameter(
                 config.layer_scale_init_value * torch.ones((SCREAMING_SNAKE_CASE_)       ),			requires_grad=SCREAMING_SNAKE_CASE_       )






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		List[str]:
          if self.use_layer_scale:
             UpperCamelCase    :  Dict							=	self.pooling(self.before_norm(SCREAMING_SNAKE_CASE_       )       )
             UpperCamelCase    :  int							=	self.layer_scale_a.unsqueeze(-1       ).unsqueeze(-1       ) * pooling_output
             # First residual connection
             UpperCamelCase    :  Tuple							=	hidden_states + self.drop_path(SCREAMING_SNAKE_CASE_       )
             UpperCamelCase    :  Optional[int]							=	()

             UpperCamelCase    :  List[Any]							=	self.output(self.after_norm(SCREAMING_SNAKE_CASE_       )       )
             UpperCamelCase    :  Tuple							=	self.layer_scale_a.unsqueeze(-1       ).unsqueeze(-1       ) * layer_output
             # Second residual connection
             UpperCamelCase    :  str							=	hidden_states + self.drop_path(SCREAMING_SNAKE_CASE_       )

             UpperCamelCase    :  Optional[int]							=	(output,) + outputs
             return outputs

          else:
             UpperCamelCase    :  int							=	self.drop_path(self.pooling(self.before_norm(SCREAMING_SNAKE_CASE_       )       )       )
             # First residual connection
             UpperCamelCase    :  List[str]							=	pooling_output + hidden_states
             UpperCamelCase    :  Any							=	()

             # Second residual connection inside the PoolFormerOutput block
             UpperCamelCase    :  str							=	self.drop_path(self.output(self.after_norm(SCREAMING_SNAKE_CASE_       )       )       )
             UpperCamelCase    :  List[Any]							=	hidden_states + layer_output

             UpperCamelCase    :  Optional[Any]							=	(output,) + outputs
             return outputs






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_       )     ->		List[Any]:
          super().__init__()
          UpperCamelCase    :  Any							=	config
          # stochastic depth decay rule
          UpperCamelCase    :  Any							=	[x.item() for x in torch.linspace(0,			config.drop_path_rate,			sum(config.depths       )       )]

          # patch embeddings
          UpperCamelCase    :  int							=	[]
          for i in range(config.num_encoder_blocks       ):
             embeddings.append(
                 PoolFormerEmbeddings(
                     patch_size=config.patch_sizes[i],			stride=config.strides[i],			padding=config.padding[i],			num_channels=config.num_channels if i == 0 else config.hidden_sizes[i - 1],			hidden_size=config.hidden_sizes[i],			)       )
          UpperCamelCase    :  Union[str, Any]							=	nn.ModuleList(SCREAMING_SNAKE_CASE_       )

          # Transformer blocks
          UpperCamelCase    :  Union[str, Any]							=	[]
          UpperCamelCase    :  List[Any]							=	0
          for i in range(config.num_encoder_blocks       ):
             # each block consists of layers
             UpperCamelCase    :  Dict							=	[]
             if i != 0:
                cur += config.depths[i - 1]
             for j in range(config.depths[i]       ):
                layers.append(
                    PoolFormerLayer(
                        SCREAMING_SNAKE_CASE_,			num_channels=config.hidden_sizes[i],			pool_size=config.pool_size,			hidden_size=config.hidden_sizes[i],			intermediate_size=int(config.hidden_sizes[i] * config.mlp_ratio       ),			drop_path=dpr[cur + j],			)       )
             blocks.append(nn.ModuleList(SCREAMING_SNAKE_CASE_       )       )

          UpperCamelCase    :  Dict							=	nn.ModuleList(SCREAMING_SNAKE_CASE_       )






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=True       )     ->		Dict:
          UpperCamelCase    :  Dict							=	() if output_hidden_states else None

          UpperCamelCase    :  Union[str, Any]							=	pixel_values
          for idx, layers in enumerate(zip(self.patch_embeddings,			self.block       )       ):
             UpperCamelCase	,     UpperCamelCase    :  Optional[Any]							=	layers
             # Get patch embeddings from hidden_states
             UpperCamelCase    :  Dict							=	embedding_layer(SCREAMING_SNAKE_CASE_       )
             # Send the embeddings through the blocks
             for _, blk in enumerate(SCREAMING_SNAKE_CASE_       ):
                UpperCamelCase    :  Optional[int]							=	blk(SCREAMING_SNAKE_CASE_       )
                UpperCamelCase    :  Union[str, Any]							=	layer_outputs[0]

             if output_hidden_states:
                UpperCamelCase    :  List[str]							=	all_hidden_states + (hidden_states,)

          if not return_dict:
             return tuple(v for v in [hidden_states, all_hidden_states] if v is not None       )

          return BaseModelOutputWithNoAttention(last_hidden_state=SCREAMING_SNAKE_CASE_,			hidden_states=SCREAMING_SNAKE_CASE_       )






class 				lowerCAmelCase_		(  a__							):
       UpperCAmelCase__				:					Union[str, Any]        =  PoolFormerConfig
       UpperCAmelCase__				:					List[str]        =  "poolformer"
       UpperCAmelCase__				:					int        =  "pixel_values"
       UpperCAmelCase__				:					List[str]        =  True
       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		Dict:
          if isinstance(SCREAMING_SNAKE_CASE_,			(nn.Linear, nn.Convad)       ):
             module.weight.data.normal_(mean=0.0,			std=self.config.initializer_range       )
             if module.bias is not None:
                module.bias.data.zero_()
          elif isinstance(SCREAMING_SNAKE_CASE_,			nn.LayerNorm       ):
             module.bias.data.zero_()
             module.weight.data.fill_(1.0       )






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_=False       )     ->		Optional[Any]:
          if isinstance(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       ):
             UpperCamelCase    :  str							=	value






__UpperCAmelCase          =       r'''
    This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) sub-class. Use
    it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
    behavior.

    Parameters:
        config ([`PoolFormerConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~PreTrainedModel.from_pretrained`] method to load the model weights.
'''

__UpperCAmelCase          =       r'''
    Args:
        pixel_values (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`PoolFormerImageProcessor.__call__`] for details.
'''



@add_start_docstrings(
    "The bare PoolFormer Model transformer outputting raw hidden-states without any specific head on top."       ,    a__       ,    )
class 				lowerCAmelCase_		(  a__							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_       )     ->		Any:
          super().__init__(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Union[str, Any]							=	config

          UpperCamelCase    :  List[Any]							=	PoolFormerEncoder(SCREAMING_SNAKE_CASE_       )

          # Initialize weights and apply final processing
          self.post_init()
       def 					snake_case_       (			self       )     ->		Optional[int]:
          return self.embeddings.patch_embeddings






       @add_start_docstrings_to_model_forward(SCREAMING_SNAKE_CASE_       )
       @add_code_sample_docstrings(
           checkpoint=_CHECKPOINT_FOR_DOC,			output_type=SCREAMING_SNAKE_CASE_,			config_class=_CONFIG_FOR_DOC,			modality='vision',			expected_output=_EXPECTED_OUTPUT_SHAPE,			)
       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_ = None,			SCREAMING_SNAKE_CASE_ = None,			SCREAMING_SNAKE_CASE_ = None,			)     ->		Union[Tuple, BaseModelOutputWithNoAttention]:
          UpperCamelCase    :  List[str]							=	(
              output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
          )
          UpperCamelCase    :  int							=	return_dict if return_dict is not None else self.config.use_return_dict

          if pixel_values is None:
             raise ValueError('You have to specify pixel_values'       )

          UpperCamelCase    :  Union[str, Any]							=	self.encoder(
              SCREAMING_SNAKE_CASE_,			output_hidden_states=SCREAMING_SNAKE_CASE_,			return_dict=SCREAMING_SNAKE_CASE_,			)
          UpperCamelCase    :  int							=	encoder_outputs[0]

          if not return_dict:
             return (sequence_output, None) + encoder_outputs[1:]

          return BaseModelOutputWithNoAttention(
              last_hidden_state=SCREAMING_SNAKE_CASE_,			hidden_states=encoder_outputs.hidden_states,			)






class 				lowerCAmelCase_		(  nn.Module							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_       )     ->		Tuple:
          super().__init__()
          UpperCamelCase    :  Tuple							=	nn.Linear(config.hidden_size,			config.hidden_size       )






       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_       )     ->		Optional[int]:
          UpperCamelCase    :  str							=	self.dense(SCREAMING_SNAKE_CASE_       )
          return output






@add_start_docstrings(
    "\n    PoolFormer Model transformer with an image classification head on top\n    "       ,    a__       ,    )
class 				lowerCAmelCase_		(  a__							):
       def __init__(			self,			SCREAMING_SNAKE_CASE_       )     ->		Tuple:
          super().__init__(SCREAMING_SNAKE_CASE_       )
          UpperCamelCase    :  Dict							=	config.num_labels
          UpperCamelCase    :  List[Any]							=	PoolFormerModel(SCREAMING_SNAKE_CASE_       )

          # Final norm
          UpperCamelCase    :  Dict							=	PoolFormerGroupNorm(config.hidden_sizes[-1]       )
          # Classifier head
          UpperCamelCase    :  Dict							=	(
              nn.Linear(config.hidden_sizes[-1],			config.num_labels       ) if config.num_labels > 0 else nn.Identity()
          )

          # Initialize weights and apply final processing
          self.post_init()






       @add_start_docstrings_to_model_forward(SCREAMING_SNAKE_CASE_       )
       @add_code_sample_docstrings(
           checkpoint=_IMAGE_CLASS_CHECKPOINT,			output_type=SCREAMING_SNAKE_CASE_,			config_class=_CONFIG_FOR_DOC,			expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT,			)
       def 					snake_case_       (			self,			SCREAMING_SNAKE_CASE_ = None,			SCREAMING_SNAKE_CASE_ = None,			SCREAMING_SNAKE_CASE_ = None,			SCREAMING_SNAKE_CASE_ = None,			)     ->		Union[Tuple, ImageClassifierOutputWithNoAttention]:
          UpperCamelCase    :  Any							=	return_dict if return_dict is not None else self.config.use_return_dict

          UpperCamelCase    :  str							=	self.poolformer(
              SCREAMING_SNAKE_CASE_,			output_hidden_states=SCREAMING_SNAKE_CASE_,			return_dict=SCREAMING_SNAKE_CASE_,			)

          UpperCamelCase    :  List[Any]							=	outputs[0]

          UpperCamelCase    :  List[Any]							=	self.classifier(self.norm(SCREAMING_SNAKE_CASE_       ).mean([-2, -1]       )       )

          UpperCamelCase    :  List[Any]							=	None
          if labels is not None:
             if self.config.problem_type is None:
                if self.num_labels == 1:
                   UpperCamelCase    :  Tuple							=	'regression'
                elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
                   UpperCamelCase    :  Union[str, Any]							=	'single_label_classification'
                else:
                   UpperCamelCase    :  Dict							=	'multi_label_classification'

             if self.config.problem_type == "regression":
                UpperCamelCase    :  List[str]							=	MSELoss()
                if self.num_labels == 1:
                   UpperCamelCase    :  Optional[Any]							=	loss_fct(logits.squeeze(),			labels.squeeze()       )
                else:
                   UpperCamelCase    :  Union[str, Any]							=	loss_fct(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       )
             elif self.config.problem_type == "single_label_classification":
                UpperCamelCase    :  str							=	CrossEntropyLoss()
                UpperCamelCase    :  Tuple							=	loss_fct(logits.view(-1,			self.num_labels       ),			labels.view(-1       )       )
             elif self.config.problem_type == "multi_label_classification":
                UpperCamelCase    :  Optional[int]							=	BCEWithLogitsLoss()
                UpperCamelCase    :  Any							=	loss_fct(SCREAMING_SNAKE_CASE_,			SCREAMING_SNAKE_CASE_       )

          if not return_dict:
             UpperCamelCase    :  Optional[Any]							=	(logits,) + outputs[2:]
             return ((loss,) + output) if loss is not None else output

          return ImageClassifierOutputWithNoAttention(loss=SCREAMING_SNAKE_CASE_,			logits=SCREAMING_SNAKE_CASE_,			hidden_states=outputs.hidden_states       )








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


__UpperCAmelCase          =       logging.get_logger(__name__)

__UpperCAmelCase          =       {
    '''google/canine-s''': '''https://huggingface.co/google/canine-s/resolve/main/config.json''',
    # See all CANINE models at https://huggingface.co/models?filter=canine
}



class 				lowerCAmelCase_		(  a__							):
       UpperCAmelCase__				:					Any        =  "canine"
       def __init__(			self,			SCREAMING_SNAKE_CASE_=768,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=3072,			SCREAMING_SNAKE_CASE_="gelu",			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=1_6384,			SCREAMING_SNAKE_CASE_=16,			SCREAMING_SNAKE_CASE_=0.02,			SCREAMING_SNAKE_CASE_=1e-12,			SCREAMING_SNAKE_CASE_=0,			SCREAMING_SNAKE_CASE_=0XE000,			SCREAMING_SNAKE_CASE_=0XE001,			SCREAMING_SNAKE_CASE_=4,			SCREAMING_SNAKE_CASE_=4,			SCREAMING_SNAKE_CASE_=8,			SCREAMING_SNAKE_CASE_=1_6384,			SCREAMING_SNAKE_CASE_=128,			**SCREAMING_SNAKE_CASE_,			)     ->		int:
          super().__init__(pad_token_id=SCREAMING_SNAKE_CASE_,			bos_token_id=SCREAMING_SNAKE_CASE_,			eos_token_id=SCREAMING_SNAKE_CASE_,			**SCREAMING_SNAKE_CASE_       )

          UpperCamelCase    :  Tuple							=	max_position_embeddings
          UpperCamelCase    :  Tuple							=	hidden_size
          UpperCamelCase    :  Union[str, Any]							=	num_hidden_layers
          UpperCamelCase    :  Optional[int]							=	num_attention_heads
          UpperCamelCase    :  Tuple							=	intermediate_size
          UpperCamelCase    :  List[str]							=	hidden_act
          UpperCamelCase    :  Union[str, Any]							=	hidden_dropout_prob
          UpperCamelCase    :  Optional[int]							=	attention_probs_dropout_prob
          UpperCamelCase    :  Optional[Any]							=	initializer_range
          UpperCamelCase    :  Tuple							=	type_vocab_size
          UpperCamelCase    :  Any							=	layer_norm_eps

          # Character config:
          UpperCamelCase    :  List[Any]							=	downsampling_rate
          UpperCamelCase    :  Optional[int]							=	upsampling_kernel_size
          UpperCamelCase    :  Tuple							=	num_hash_functions
          UpperCamelCase    :  Union[str, Any]							=	num_hash_buckets
          UpperCamelCase    :  str							=	local_transformer_stride



