


'''simple docstring'''







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


lowerCAmelCase     :  Tuple											=    logging.get_logger(__name__)

lowerCAmelCase     :  Dict											=    {
    """unc-nlp/lxmert-base-uncased""": """https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json""",
}
class 						UpperCamelCase__       (			SCREAMING_SNAKE_CASE_						):



     """simple docstring"""






     __magic_name__           =     "lxmert"
     __magic_name__           =     {}







     def __init__(			self   ,						snake_case__=3_0522   ,						snake_case__=768   ,						snake_case__=12   ,						snake_case__=9500   ,						snake_case__=1600   ,						snake_case__=400   ,						snake_case__=3072   ,						snake_case__="gelu"   ,						snake_case__=0.1   ,						snake_case__=0.1   ,						snake_case__=512   ,						snake_case__=2   ,						snake_case__=0.02   ,						snake_case__=1E-12   ,						snake_case__=9   ,						snake_case__=5   ,						snake_case__=5   ,						snake_case__=2048   ,						snake_case__=4   ,						snake_case__=6.67   ,						snake_case__=True   ,						snake_case__=True   ,						snake_case__=True   ,						snake_case__=True   ,						snake_case__=True   ,						snake_case__=True   ,						snake_case__=True   ,						**snake_case__   ,						):

            '''simple docstring'''

            _lowerCAmelCase     :				Optional[int]       =							vocab_size
            _lowerCAmelCase     :				Union[str, Any]       =							hidden_size
            _lowerCAmelCase     :				Optional[Any]       =							num_attention_heads
            _lowerCAmelCase     :				Tuple       =							hidden_act
            _lowerCAmelCase     :				Optional[Any]       =							intermediate_size
            _lowerCAmelCase     :				int       =							hidden_dropout_prob
            _lowerCAmelCase     :				List[Any]       =							attention_probs_dropout_prob
            _lowerCAmelCase     :				Optional[Any]       =							max_position_embeddings
            _lowerCAmelCase     :				Tuple       =							type_vocab_size
            _lowerCAmelCase     :				Optional[Any]       =							initializer_range
            _lowerCAmelCase     :				List[str]       =							layer_norm_eps
            _lowerCAmelCase     :				int       =							num_qa_labels
            _lowerCAmelCase     :				Union[str, Any]       =							num_object_labels
            _lowerCAmelCase     :				List[str]       =							num_attr_labels
            _lowerCAmelCase     :				Any       =							l_layers
            _lowerCAmelCase     :				Union[str, Any]       =							x_layers
            _lowerCAmelCase     :				Union[str, Any]       =							r_layers
            _lowerCAmelCase     :				List[Any]       =							visual_feat_dim
            _lowerCAmelCase     :				Optional[Any]       =							visual_pos_dim
            _lowerCAmelCase     :				Tuple       =							visual_loss_normalizer
            _lowerCAmelCase     :				List[str]       =							task_matched
            _lowerCAmelCase     :				int       =							task_mask_lm
            _lowerCAmelCase     :				int       =							task_obj_predict
            _lowerCAmelCase     :				Any       =							task_qa
            _lowerCAmelCase     :				Any       =							visual_obj_loss
            _lowerCAmelCase     :				Optional[int]       =							visual_attr_loss
            _lowerCAmelCase     :				Tuple       =							visual_feat_loss
            _lowerCAmelCase     :				int       =							{'vision': r_layers, 'cross_encoder': x_layers, 'language': l_layers}
            super().__init__(**snake_case__ )





'''simple docstring'''







import unittest

from transformers import RoFormerTokenizer, RoFormerTokenizerFast
from transformers.testing_utils import require_rjieba, require_tokenizers

from ...test_tokenization_common import TokenizerTesterMixin
@require_rjieba
@require_tokenizers
class 						UpperCamelCase__       (			SCREAMING_SNAKE_CASE_     ,       unittest.TestCase						):



     """simple docstring"""






     __magic_name__           =     RoFormerTokenizer
     __magic_name__           =     RoFormerTokenizerFast
     __magic_name__           =     True
     __magic_name__           =     True







     def a						(			self ):

            '''simple docstring'''

            super().setUp()







     def a						(			self   ,						**snake_case__ ):

            '''simple docstring'''

            return self.tokenizer_class.from_pretrained('junnyu/roformer_chinese_base'   ,						**snake_case__ )







     def a						(			self   ,						**snake_case__ ):

            '''simple docstring'''

            return self.rust_tokenizer_class.from_pretrained('junnyu/roformer_chinese_base'   ,						**snake_case__ )







     def a						(			self ):

            '''simple docstring'''

            _lowerCAmelCase     :				List[Any]       =							'永和服装饰品有限公司,今天天气非常好'
            _lowerCAmelCase     :				str       =							'永和 服装 饰品 有限公司 , 今 天 天 气 非常 好'
            return input_text, output_text







     def a						(			self ):

            '''simple docstring'''

            _lowerCAmelCase     :				Optional[int]       =							self.get_tokenizer()
            _lowerCAmelCase      ,  _lowerCAmelCase     :				int       =							self.get_chinese_input_output_texts()
            _lowerCAmelCase     :				List[Any]       =							tokenizer.tokenize(snake_case__ )

            self.assertListEqual(snake_case__   ,						output_text.split() )

            _lowerCAmelCase     :				Optional[Any]       =							tokens + [tokenizer.unk_token]
            _lowerCAmelCase     :				List[str]       =							[2_2943, 2_1332, 3_4431, 4_5904, 117, 306, 1231, 1231, 2653, 3_3994, 1266, 100]
            self.assertListEqual(tokenizer.convert_tokens_to_ids(snake_case__ )   ,						snake_case__ )







     def a						(			self ):

            '''simple docstring'''

            _lowerCAmelCase     :				List[Any]       =							self.get_rust_tokenizer()
            _lowerCAmelCase      ,  _lowerCAmelCase     :				Any       =							self.get_chinese_input_output_texts()
            _lowerCAmelCase     :				Optional[int]       =							tokenizer.tokenize(snake_case__ )
            self.assertListEqual(snake_case__   ,						output_text.split() )
            _lowerCAmelCase     :				Tuple       =							tokens + [tokenizer.unk_token]
            _lowerCAmelCase     :				List[Any]       =							[2_2943, 2_1332, 3_4431, 4_5904, 117, 306, 1231, 1231, 2653, 3_3994, 1266, 100]
            self.assertListEqual(tokenizer.convert_tokens_to_ids(snake_case__ )   ,						snake_case__ )







     def a						(			self ):

            '''simple docstring'''

            pass







     def a						(			self ):

            '''simple docstring'''

            pass







     def a						(			self ):

            '''simple docstring'''

            pass

