'''simple docstring'''

from typing import Optional

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

from ...activations import ACTaFN
from ...modeling_outputs import (
    BackboneOutput,
    BaseModelOutputWithNoAttention,
    BaseModelOutputWithPoolingAndNoAttention,
    ImageClassifierOutputWithNoAttention,
)
from ...modeling_utils import PreTrainedModel
from ...utils import (
    add_code_sample_docstrings,
    add_start_docstrings,
    add_start_docstrings_to_model_forward,
    logging,
    replace_return_docstrings,
)
from ...utils.backbone_utils import BackboneMixin
from .configuration_resnet import ResNetConfig


__a:			List[Any]	       =       logging.get_logger(__name__)

# General docstring
__a:			List[Any]	       =       """ResNetConfig"""

# Base docstring
__a:			Optional[Any]	       =       """microsoft/resnet-50"""
__a:			Optional[int]	       =       [1, 20_48, 7, 7]

# Image classification docstring
__a:			List[str]	       =       """microsoft/resnet-50"""
__a:			List[Any]	       =       """tiger cat"""

__a:			Optional[Any]	       =       [
    """microsoft/resnet-50""",
    # See all resnet models at https://huggingface.co/models?filter=resnet
]



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase = 3     ,       __lowerCAmelCase = 1     ,       __lowerCAmelCase = "relu"			)  ->  Any:
        super().__init__()
        lowercase__    :   Dict						= nn.Convad(
            __lowerCAmelCase     ,       __lowerCAmelCase     ,       kernel_size=__lowerCAmelCase     ,       stride=__lowerCAmelCase     ,       padding=kernel_size // 2     ,       bias=__lowerCAmelCase			)
        lowercase__    :   str						= nn.BatchNormad(__lowerCAmelCase			)
        lowercase__    :   List[str]						= ACTaFN[activation] if activation is not None else nn.Identity()


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Tensor:
        lowercase__    :   int						= self.convolution(__lowerCAmelCase			)
        lowercase__    :   Any						= self.normalization(__lowerCAmelCase			)
        lowercase__    :   int						= self.activation(__lowerCAmelCase			)
        return hidden_state



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase			)  ->  List[Any]:
        super().__init__()
        lowercase__    :   str						= ResNetConvLayer(
            config.num_channels     ,       config.embedding_size     ,       kernel_size=7     ,       stride=2     ,       activation=config.hidden_act			)
        lowercase__    :   Union[str, Any]						= nn.MaxPoolad(kernel_size=3     ,       stride=2     ,       padding=1			)
        lowercase__    :   int						= config.num_channels


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Tensor:
        lowercase__    :   int						= pixel_values.shape[1]
        if num_channels != self.num_channels:
         raise ValueError(
             '''Make sure that the channel dimension of the pixel values match with the one set in the configuration.'''			)
        lowercase__    :   List[Any]						= self.embedder(__lowerCAmelCase			)
        lowercase__    :   List[str]						= self.pooler(__lowerCAmelCase			)
        return embedding



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase = 2			)  ->  Optional[Any]:
        super().__init__()
        lowercase__    :   Dict						= nn.Convad(__lowerCAmelCase     ,       __lowerCAmelCase     ,       kernel_size=1     ,       stride=__lowerCAmelCase     ,       bias=__lowerCAmelCase			)
        lowercase__    :   Any						= nn.BatchNormad(__lowerCAmelCase			)


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Tensor:
        lowercase__    :   str						= self.convolution(__lowerCAmelCase			)
        lowercase__    :   Optional[int]						= self.normalization(__lowerCAmelCase			)
        return hidden_state



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase = 1     ,       __lowerCAmelCase = "relu"			)  ->  Optional[int]:
        super().__init__()
        lowercase__    :   Any						= in_channels != out_channels or stride != 1
        lowercase__    :   Any						= (
            ResNetShortCut(__lowerCAmelCase     ,       __lowerCAmelCase     ,       stride=__lowerCAmelCase			) if should_apply_shortcut else nn.Identity()
        )
        lowercase__    :   Dict						= nn.Sequential(
            ResNetConvLayer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       stride=__lowerCAmelCase			)     ,       ResNetConvLayer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       activation=__lowerCAmelCase			)     ,       )
        lowercase__    :   str						= ACTaFN[activation]


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Optional[int]:
        lowercase__    :   List[str]						= hidden_state
        lowercase__    :   int						= self.layer(__lowerCAmelCase			)
        lowercase__    :   Tuple						= self.shortcut(__lowerCAmelCase			)
        hidden_state += residual
        lowercase__    :   Tuple						= self.activation(__lowerCAmelCase			)
        return hidden_state



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase = 1     ,       __lowerCAmelCase = "relu"     ,       __lowerCAmelCase = 4			)  ->  Tuple:
        super().__init__()
        lowercase__    :   Union[str, Any]						= in_channels != out_channels or stride != 1
        lowercase__    :   Any						= out_channels // reduction
        lowercase__    :   List[Any]						= (
            ResNetShortCut(__lowerCAmelCase     ,       __lowerCAmelCase     ,       stride=__lowerCAmelCase			) if should_apply_shortcut else nn.Identity()
        )
        lowercase__    :   str						= nn.Sequential(
            ResNetConvLayer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       kernel_size=1			)     ,       ResNetConvLayer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       stride=__lowerCAmelCase			)     ,       ResNetConvLayer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       kernel_size=1     ,       activation=__lowerCAmelCase			)     ,       )
        lowercase__    :   int						= ACTaFN[activation]


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Tuple:
        lowercase__    :   List[str]						= hidden_state
        lowercase__    :   Union[str, Any]						= self.layer(__lowerCAmelCase			)
        lowercase__    :   Dict						= self.shortcut(__lowerCAmelCase			)
        hidden_state += residual
        lowercase__    :   Optional[Any]						= self.activation(__lowerCAmelCase			)
        return hidden_state



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase = 2     ,       __lowerCAmelCase = 2     ,       )  ->  Tuple:
        super().__init__()

        lowercase__    :   Optional[Any]						= ResNetBottleNeckLayer if config.layer_type == '''bottleneck''' else ResNetBasicLayer

        lowercase__    :   int						= nn.Sequential(
            # downsampling is done in the first layer with stride of 2
            layer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       stride=__lowerCAmelCase     ,       activation=config.hidden_act			)     ,       *[layer(__lowerCAmelCase     ,       __lowerCAmelCase     ,       activation=config.hidden_act			) for _ in range(depth - 1			)]     ,       )


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Tensor:
        lowercase__    :   Tuple						= input
        for layer in self.layers:
         lowercase__    :   Optional[Any]						= layer(__lowerCAmelCase			)
        return hidden_state



class       UpperCAmelCase  (						nn.Module ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase			)  ->  Tuple:
        super().__init__()
        lowercase__    :   Optional[int]						= nn.ModuleList([]			)
        # based on `downsample_in_first_stage` the first layer of the first stage may or may not downsample the input
        self.stages.append(
            ResNetStage(
                __lowerCAmelCase     ,       config.embedding_size     ,       config.hidden_sizes[0]     ,       stride=2 if config.downsample_in_first_stage else 1     ,       depth=config.depths[0]     ,       )			)
        lowercase__    :   int						= zip(config.hidden_sizes     ,       config.hidden_sizes[1:]			)
        for (in_channels, out_channels), depth in zip(__lowerCAmelCase     ,       config.depths[1:]			):
         self.stages.append(ResNetStage(__lowerCAmelCase     ,       __lowerCAmelCase     ,       __lowerCAmelCase     ,       depth=__lowerCAmelCase			)			)


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase = False     ,       __lowerCAmelCase = True			)  ->  BaseModelOutputWithNoAttention:
        lowercase__    :   List[Any]						= () if output_hidden_states else None

        for stage_module in self.stages:
         if output_hidden_states:
          lowercase__    :   List[str]						= hidden_states + (hidden_state,)

         lowercase__    :   Optional[Any]						= stage_module(__lowerCAmelCase			)

        if output_hidden_states:
         lowercase__    :   List[str]						= hidden_states + (hidden_state,)

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

        return BaseModelOutputWithNoAttention(
            last_hidden_state=__lowerCAmelCase     ,       hidden_states=__lowerCAmelCase     ,       )



class       UpperCAmelCase  (						a__ ):





       '''simple docstring'''



       SCREAMING_SNAKE_CASE 		=   ResNetConfig
       SCREAMING_SNAKE_CASE 		=   "resnet"
       SCREAMING_SNAKE_CASE 		=   "pixel_values"
       SCREAMING_SNAKE_CASE 		=   True

       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Union[str, Any]:
        if isinstance(__lowerCAmelCase     ,       nn.Convad			):
         nn.init.kaiming_normal_(module.weight     ,       mode='''fan_out'''     ,       nonlinearity='''relu'''			)
        elif isinstance(__lowerCAmelCase     ,       (nn.BatchNormad, nn.GroupNorm)			):
         nn.init.constant_(module.weight     ,       1			)
         nn.init.constant_(module.bias     ,       0			)


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase=False			)  ->  str:
        if isinstance(__lowerCAmelCase     ,       __lowerCAmelCase			):
         lowercase__    :   Dict						= value


__a:			str	       =       R"""
    This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it
    as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
    behavior.

    Parameters:
        config ([`ResNetConfig`]): 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.
"""

__a:			Union[str, Any]	       =       R"""
    Args:
        pixel_values (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`ConvNextImageProcessor.__call__`] for details.

        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""



@add_start_docstrings(
    "The bare ResNet model outputting raw features without any specific head on top."   ,						a__   ,						)
class       UpperCAmelCase  (						a__ ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase			)  ->  Dict:
        super().__init__(__lowerCAmelCase			)
        lowercase__    :   Dict						= config
        lowercase__    :   Union[str, Any]						= ResNetEmbeddings(__lowerCAmelCase			)
        lowercase__    :   str						= ResNetEncoder(__lowerCAmelCase			)
        lowercase__    :   Dict						= nn.AdaptiveAvgPoolad((1, 1)			)
        # Initialize weights and apply final processing
        self.post_init()


       @add_start_docstrings_to_model_forward(__lowerCAmelCase			)
       @add_code_sample_docstrings(
           checkpoint=_CHECKPOINT_FOR_DOC     ,       output_type=__lowerCAmelCase     ,       config_class=_CONFIG_FOR_DOC     ,       modality='''vision'''     ,       expected_output=_EXPECTED_OUTPUT_SHAPE     ,       )
       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase = None     ,       __lowerCAmelCase = None			)  ->  BaseModelOutputWithPoolingAndNoAttention:
        lowercase__    :   Dict						= (
            output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
        )
        lowercase__    :   Union[str, Any]						= return_dict if return_dict is not None else self.config.use_return_dict

        lowercase__    :   List[Any]						= self.embedder(__lowerCAmelCase			)

        lowercase__    :   List[Any]						= self.encoder(
            __lowerCAmelCase     ,       output_hidden_states=__lowerCAmelCase     ,       return_dict=__lowerCAmelCase			)

        lowercase__    :   List[str]						= encoder_outputs[0]

        lowercase__    :   Optional[int]						= self.pooler(__lowerCAmelCase			)

        if not return_dict:
         return (last_hidden_state, pooled_output) + encoder_outputs[1:]

        return BaseModelOutputWithPoolingAndNoAttention(
            last_hidden_state=__lowerCAmelCase     ,       pooler_output=__lowerCAmelCase     ,       hidden_states=encoder_outputs.hidden_states     ,       )



@add_start_docstrings(
    "\n    ResNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for\n    ImageNet.\n    "   ,						a__   ,						)
class       UpperCAmelCase  (						a__ ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase			)  ->  str:
        super().__init__(__lowerCAmelCase			)
        lowercase__    :   int						= config.num_labels
        lowercase__    :   List[str]						= ResNetModel(__lowerCAmelCase			)
        # classification head
        lowercase__    :   Optional[int]						= nn.Sequential(
            nn.Flatten()     ,       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(__lowerCAmelCase			)
       @add_code_sample_docstrings(
           checkpoint=_IMAGE_CLASS_CHECKPOINT     ,       output_type=__lowerCAmelCase     ,       config_class=_CONFIG_FOR_DOC     ,       expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT     ,       )
       def _lowerCAmelCase(						self     ,       __lowerCAmelCase = None     ,       __lowerCAmelCase = None     ,       __lowerCAmelCase = None     ,       __lowerCAmelCase = None     ,       )  ->  ImageClassifierOutputWithNoAttention:
        lowercase__    :   List[str]						= return_dict if return_dict is not None else self.config.use_return_dict

        lowercase__    :   List[str]						= self.resnet(__lowerCAmelCase     ,       output_hidden_states=__lowerCAmelCase     ,       return_dict=__lowerCAmelCase			)

        lowercase__    :   List[Any]						= outputs.pooler_output if return_dict else outputs[1]

        lowercase__    :   Union[str, Any]						= self.classifier(__lowerCAmelCase			)

        lowercase__    :   int						= None

        if labels is not None:
         if self.config.problem_type is None:
          if self.num_labels == 1:
           lowercase__    :   Tuple						= '''regression'''
          elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
           lowercase__    :   Any						= '''single_label_classification'''
          else:
           lowercase__    :   int						= '''multi_label_classification'''
         if self.config.problem_type == "regression":
          lowercase__    :   int						= MSELoss()
          if self.num_labels == 1:
           lowercase__    :   str						= loss_fct(logits.squeeze()     ,       labels.squeeze()			)
          else:
           lowercase__    :   Any						= loss_fct(__lowerCAmelCase     ,       __lowerCAmelCase			)
         elif self.config.problem_type == "single_label_classification":
          lowercase__    :   Tuple						= CrossEntropyLoss()
          lowercase__    :   str						= loss_fct(logits.view(-1     ,       self.num_labels			)     ,       labels.view(-1			)			)
         elif self.config.problem_type == "multi_label_classification":
          lowercase__    :   Tuple						= BCEWithLogitsLoss()
          lowercase__    :   Any						= loss_fct(__lowerCAmelCase     ,       __lowerCAmelCase			)

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

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



@add_start_docstrings(
    "\n    ResNet backbone, to be used with frameworks like DETR and MaskFormer.\n    "   ,						a__   ,						)
class       UpperCAmelCase  (						a__   ,						a__ ):





       '''simple docstring'''



       def __init__(						self     ,       __lowerCAmelCase			)  ->  List[Any]:
        super().__init__(__lowerCAmelCase			)
        super()._init_backbone(__lowerCAmelCase			)

        lowercase__    :   str						= [config.embedding_size] + config.hidden_sizes
        lowercase__    :   Any						= ResNetEmbeddings(__lowerCAmelCase			)
        lowercase__    :   Optional[int]						= ResNetEncoder(__lowerCAmelCase			)

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


       @add_start_docstrings_to_model_forward(__lowerCAmelCase			)
       @replace_return_docstrings(output_type=__lowerCAmelCase     ,       config_class=_CONFIG_FOR_DOC			)
       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase = None     ,       __lowerCAmelCase = None			)  ->  BackboneOutput:
        lowercase__    :   Union[str, Any]						= return_dict if return_dict is not None else self.config.use_return_dict
        lowercase__    :   int						= (
            output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
        )

        lowercase__    :   str						= self.embedder(__lowerCAmelCase			)

        lowercase__    :   List[str]						= self.encoder(__lowerCAmelCase     ,       output_hidden_states=__lowerCAmelCase     ,       return_dict=__lowerCAmelCase			)

        lowercase__    :   Optional[Any]						= outputs.hidden_states

        lowercase__    :   Dict						= ()
        for idx, stage in enumerate(self.stage_names			):
         if stage in self.out_features:
          feature_maps += (hidden_states[idx],)

        if not return_dict:
         lowercase__    :   Optional[int]						= (feature_maps,)
         if output_hidden_states:
          output += (outputs.hidden_states,)
         return output

        return BackboneOutput(
            feature_maps=__lowerCAmelCase     ,       hidden_states=outputs.hidden_states if output_hidden_states else None     ,       attentions=__lowerCAmelCase     ,       )


'''simple docstring'''

import json
import os
import unittest

from transformers import OpenAIGPTTokenizer, OpenAIGPTTokenizerFast
from transformers.models.openai.tokenization_openai import VOCAB_FILES_NAMES
from transformers.testing_utils import require_ftfy, require_spacy, require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin



@require_tokenizers
class       UpperCAmelCase  (						a__   ,						unittest.TestCase ):





       '''simple docstring'''



       SCREAMING_SNAKE_CASE 		=   OpenAIGPTTokenizer
       SCREAMING_SNAKE_CASE 		=   OpenAIGPTTokenizerFast
       SCREAMING_SNAKE_CASE 		=   True
       SCREAMING_SNAKE_CASE 		=   False

       def _lowerCAmelCase(						self			)  ->  Optional[int]:
        super().setUp()

        # Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
        lowercase__    :   Optional[Any]						= [
            '''l''',
            '''o''',
            '''w''',
            '''e''',
            '''r''',
            '''s''',
            '''t''',
            '''i''',
            '''d''',
            '''n''',
            '''w</w>''',
            '''r</w>''',
            '''t</w>''',
            '''lo''',
            '''low''',
            '''er</w>''',
            '''low</w>''',
            '''lowest</w>''',
            '''newer</w>''',
            '''wider</w>''',
            '''<unk>''',
        ]
        lowercase__    :   Optional[int]						= dict(zip(__lowerCAmelCase     ,       range(len(__lowerCAmelCase			)			)			)			)
        lowercase__    :   Union[str, Any]						= ['''#version: 0.2''', '''l o''', '''lo w''', '''e r</w>''', '''''']

        lowercase__    :   Optional[int]						= os.path.join(self.tmpdirname     ,       VOCAB_FILES_NAMES['''vocab_file''']			)
        lowercase__    :   Optional[int]						= os.path.join(self.tmpdirname     ,       VOCAB_FILES_NAMES['''merges_file''']			)
        with open(self.vocab_file     ,       '''w'''			) as fp:
         fp.write(json.dumps(__lowerCAmelCase			)			)
        with open(self.merges_file     ,       '''w'''			) as fp:
         fp.write('''\n'''.join(__lowerCAmelCase			)			)

       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Dict:
        return "lower newer", "lower newer"

       def _lowerCAmelCase(						self			)  ->  List[Any]:
        lowercase__    :   int						= OpenAIGPTTokenizer(self.vocab_file     ,       self.merges_file			)

        lowercase__    :   List[Any]						= '''lower'''
        lowercase__    :   Any						= ['''low''', '''er</w>''']
        lowercase__    :   Union[str, Any]						= tokenizer.tokenize(__lowerCAmelCase			)
        self.assertListEqual(__lowerCAmelCase     ,       __lowerCAmelCase			)

        lowercase__    :   Tuple						= tokens + ['''<unk>''']
        lowercase__    :   Optional[Any]						= [14, 15, 20]
        self.assertListEqual(tokenizer.convert_tokens_to_ids(__lowerCAmelCase			)     ,       __lowerCAmelCase			)

       def _lowerCAmelCase(						self     ,       __lowerCAmelCase=15			)  ->  Optional[int]:
        for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
         with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""			):
          lowercase__    :   List[str]						= self.rust_tokenizer_class.from_pretrained(__lowerCAmelCase     ,       **__lowerCAmelCase			)

          # Simple input
          lowercase__    :   List[str]						= '''This is a simple input'''
          lowercase__    :   Any						= ['''This is a simple input 1''', '''This is a simple input 2''']
          lowercase__    :   str						= ('''This is a simple input''', '''This is a pair''')
          lowercase__    :   str						= [
              ('''This is a simple input 1''', '''This is a simple input 2'''),
              ('''This is a simple pair 1''', '''This is a simple pair 2'''),
          ]

          # Simple input tests
          self.assertRaises(__lowerCAmelCase     ,       tokenizer_r.encode     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''			)

          # Simple input
          self.assertRaises(__lowerCAmelCase     ,       tokenizer_r.encode_plus     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''			)

          # Simple input
          self.assertRaises(
              __lowerCAmelCase     ,       tokenizer_r.batch_encode_plus     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''     ,       )

          # Pair input
          self.assertRaises(__lowerCAmelCase     ,       tokenizer_r.encode     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''			)

          # Pair input
          self.assertRaises(__lowerCAmelCase     ,       tokenizer_r.encode_plus     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''			)

          # Pair input
          self.assertRaises(
              __lowerCAmelCase     ,       tokenizer_r.batch_encode_plus     ,       __lowerCAmelCase     ,       max_length=__lowerCAmelCase     ,       padding='''max_length'''     ,       )


       def _lowerCAmelCase(						self			)  ->  Tuple:
        pass



@require_ftfy
@require_spacy
@require_tokenizers
class       UpperCAmelCase  (						a__ ):





       '''simple docstring'''



       pass

