'''simple docstring'''






import inspect
import unittest
import warnings

from transformers import DeiTConfig
from transformers.models.auto import get_values
from transformers.testing_utils import (
    require_accelerate,
    require_torch,
    require_torch_gpu,
    require_vision,
    slow,
    torch_device,
)
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
 import torch
 from torch import nn

 from transformers import (
     MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
     MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
     MODEL_MAPPING,
     DeiTForImageClassification,
     DeiTForImageClassificationWithTeacher,
     DeiTForMaskedImageModeling,
     DeiTModel,
 )
 from transformers.models.deit.modeling_deit import DEIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
 from PIL import Image

 from transformers import DeiTImageProcessor

class  UpperCAmelCase__						:



    def __init__(	self      :       Tuple,__A      :       int,__A      :       Tuple=1_3,__A      :       List[str]=3_0,__A      :       Tuple=2,__A      :       Any=3,__A      :       Dict=True,__A      :       Optional[int]=True,__A      :       int=3_2,__A      :       List[str]=5,__A      :       Any=4,__A      :       Optional[int]=3_7,__A      :       List[Any]="gelu",__A      :       int=0.1,__A      :       Union[str, Any]=0.1,__A      :       Optional[Any]=1_0,__A      :       Dict=0.02,__A      :       Tuple=3,__A      :       Union[str, Any]=None,__A      :       List[Any]=2,):
          _lowerCamelCase				:   List[Any]								=   parent
          _lowerCamelCase				:   Optional[int]								=   batch_size
          _lowerCamelCase				:   Any								=   image_size
          _lowerCamelCase				:   Optional[Any]								=   patch_size
          _lowerCamelCase				:   Optional[Any]								=   num_channels
          _lowerCamelCase				:   Tuple								=   is_training
          _lowerCamelCase				:   Optional[Any]								=   use_labels
          _lowerCamelCase				:   Union[str, Any]								=   hidden_size
          _lowerCamelCase				:   Tuple								=   num_hidden_layers
          _lowerCamelCase				:   Union[str, Any]								=   num_attention_heads
          _lowerCamelCase				:   Union[str, Any]								=   intermediate_size
          _lowerCamelCase				:   Any								=   hidden_act
          _lowerCamelCase				:   Tuple								=   hidden_dropout_prob
          _lowerCamelCase				:   Dict								=   attention_probs_dropout_prob
          _lowerCamelCase				:   Any								=   type_sequence_label_size
          _lowerCamelCase				:   Tuple								=   initializer_range
          _lowerCamelCase				:   List[Any]								=   scope
          _lowerCamelCase				:   Optional[int]								=   encoder_stride

          # in DeiT, the seq length equals the number of patches + 2 (we add 2 for the [CLS] and distilation tokens)
          _lowerCamelCase				:   List[str]								=   (image_size // patch_size) ** 2
          _lowerCamelCase				:   List[str]								=   num_patches + 2



    def   lowerCamelCase_  (	self      :       Union[str, Any]     ):
          _lowerCamelCase				:   Union[str, Any]								=   floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]     )

          _lowerCamelCase				:   List[Any]								=   None
          if self.use_labels:
                _lowerCamelCase				:   List[str]								=   ids_tensor([self.batch_size],self.type_sequence_label_size     )

          _lowerCamelCase				:   Dict								=   self.get_config()

          return config, pixel_values, labels



    def   lowerCamelCase_  (	self      :       str     ):
          return DeiTConfig(
              image_size=self.image_size,patch_size=self.patch_size,num_channels=self.num_channels,hidden_size=self.hidden_size,num_hidden_layers=self.num_hidden_layers,num_attention_heads=self.num_attention_heads,intermediate_size=self.intermediate_size,hidden_act=self.hidden_act,hidden_dropout_prob=self.hidden_dropout_prob,attention_probs_dropout_prob=self.attention_probs_dropout_prob,is_decoder=__lowerCamelCase,initializer_range=self.initializer_range,encoder_stride=self.encoder_stride,)



    def   lowerCamelCase_  (	self      :       int,__A      :       Optional[Any],__A      :       int,__A      :       List[str]     ):
          _lowerCamelCase				:   Optional[int]								=   DeiTModel(config=__lowerCamelCase     )
          model.to(__lowerCamelCase     )
          model.eval()
          _lowerCamelCase				:   List[Any]								=   model(__lowerCamelCase     )
          self.parent.assertEqual(result.last_hidden_state.shape,(self.batch_size, self.seq_length, self.hidden_size)     )



    def   lowerCamelCase_  (	self      :       List[Any],__A      :       Optional[Any],__A      :       Dict,__A      :       Any     ):
          _lowerCamelCase				:   List[Any]								=   DeiTForMaskedImageModeling(config=__lowerCamelCase     )
          model.to(__lowerCamelCase     )
          model.eval()
          _lowerCamelCase				:   Optional[int]								=   model(__lowerCamelCase     )
          self.parent.assertEqual(
              result.reconstruction.shape,(self.batch_size, self.num_channels, self.image_size, self.image_size)     )

          # test greyscale images
          _lowerCamelCase				:   List[str]								=   1
          _lowerCamelCase				:   Optional[int]								=   DeiTForMaskedImageModeling(__lowerCamelCase     )
          model.to(__lowerCamelCase     )
          model.eval()

          _lowerCamelCase				:   Dict								=   floats_tensor([self.batch_size, 1, self.image_size, self.image_size]     )
          _lowerCamelCase				:   Optional[int]								=   model(__lowerCamelCase     )
          self.parent.assertEqual(result.reconstruction.shape,(self.batch_size, 1, self.image_size, self.image_size)     )



    def   lowerCamelCase_  (	self      :       Any,__A      :       str,__A      :       List[str],__A      :       int     ):
          _lowerCamelCase				:   str								=   self.type_sequence_label_size
          _lowerCamelCase				:   List[str]								=   DeiTForImageClassification(__lowerCamelCase     )
          model.to(__lowerCamelCase     )
          model.eval()
          _lowerCamelCase				:   Tuple								=   model(__lowerCamelCase,labels=__lowerCamelCase     )
          self.parent.assertEqual(result.logits.shape,(self.batch_size, self.type_sequence_label_size)     )

          # test greyscale images
          _lowerCamelCase				:   Any								=   1
          _lowerCamelCase				:   str								=   DeiTForImageClassification(__lowerCamelCase     )
          model.to(__lowerCamelCase     )
          model.eval()

          _lowerCamelCase				:   Tuple								=   floats_tensor([self.batch_size, 1, self.image_size, self.image_size]     )
          _lowerCamelCase				:   Tuple								=   model(__lowerCamelCase,labels=__lowerCamelCase     )
          self.parent.assertEqual(result.logits.shape,(self.batch_size, self.type_sequence_label_size)     )



    def   lowerCamelCase_  (	self      :       Any     ):
          _lowerCamelCase				:   Dict								=   self.prepare_config_and_inputs()
          (
              _lowerCamelCase 
          )				:   Tuple								=   config_and_inputs
          _lowerCamelCase				:   int								=   {"pixel_values": pixel_values}
          return config, inputs_dict


@require_torch
class  UpperCAmelCase__						(       _A						,	_A						,	unittest.TestCase ):
    lowerCAmelCase_				    =		(
        (
            DeiTModel,
            DeiTForImageClassification,
            DeiTForImageClassificationWithTeacher,
            DeiTForMaskedImageModeling,
        )
        if is_torch_available()
        else ()
    )
    lowerCAmelCase_				    =		(
        {
            'feature-extraction': DeiTModel,
            'image-classification': (DeiTForImageClassification, DeiTForImageClassificationWithTeacher),
        }
        if is_torch_available()
        else {}
    )

    lowerCAmelCase_				    =		False
    lowerCAmelCase_				    =		False
    lowerCAmelCase_				    =		False



    def   lowerCamelCase_  (	self      :       int     ):
          _lowerCamelCase				:   str								=   DeiTModelTester(self     )
          _lowerCamelCase				:   Optional[int]								=   ConfigTester(self,config_class=__lowerCamelCase,has_text_modality=__lowerCamelCase,hidden_size=3_7     )



    def   lowerCamelCase_  (	self      :       Dict     ):
          self.config_tester.run_common_tests()



    @unittest.skip(reason="DeiT does not use inputs_embeds"     )
    def   lowerCamelCase_  (	self      :       Any     ):
          pass



    def   lowerCamelCase_  (	self      :       Any     ):
          _lowerCamelCase				:   Dict								=   self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
                _lowerCamelCase				:   Dict								=   model_class(__lowerCamelCase     )
                self.assertIsInstance(model.get_input_embeddings(),(nn.Module)     )
                _lowerCamelCase				:   Any								=   model.get_output_embeddings()
                self.assertTrue(x is None or isinstance(__lowerCamelCase,nn.Linear     )     )



    def   lowerCamelCase_  (	self      :       Any     ):
          _lowerCamelCase				:   Optional[Any]								=   self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
                _lowerCamelCase				:   Union[str, Any]								=   model_class(__lowerCamelCase     )
                _lowerCamelCase				:   Optional[int]								=   inspect.signature(model.forward     )
                # signature.parameters is an OrderedDict => so arg_names order is deterministic
                _lowerCamelCase				:   Any								=   [*signature.parameters.keys()]

                _lowerCamelCase				:   Any								=   ["pixel_values"]
                self.assertListEqual(arg_names[:1],__lowerCamelCase     )



    def   lowerCamelCase_  (	self      :       int     ):
          _lowerCamelCase				:   Any								=   self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*__lowerCamelCase     )



    def   lowerCamelCase_  (	self      :       Optional[Any]     ):
          _lowerCamelCase				:   List[Any]								=   self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_masked_image_modeling(*__lowerCamelCase     )



    def   lowerCamelCase_  (	self      :       int     ):
          _lowerCamelCase				:   List[Any]								=   self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_image_classification(*__lowerCamelCase     )



    def   lowerCamelCase_  (	self      :       Tuple,__A      :       int,__A      :       Optional[Any],__A      :       List[Any]=False     ):
          _lowerCamelCase				:   Union[str, Any]								=   super()._prepare_for_class(__lowerCamelCase,__lowerCamelCase,return_labels=__lowerCamelCase     )

          if return_labels:
                if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
                      del inputs_dict["labels"]

          return inputs_dict



    def   lowerCamelCase_  (	self      :       Optional[int]     ):
          if not self.model_tester.is_training:
                return

          _lowerCamelCase				:   Optional[int]								=   self.model_tester.prepare_config_and_inputs_for_common()
          _lowerCamelCase				:   Dict								=   True

          for model_class in self.all_model_classes:
                # DeiTForImageClassificationWithTeacher supports inference-only
                if (
                    model_class in get_values(__lowerCamelCase     )
                    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
                ):
                      continue
                _lowerCamelCase				:   Union[str, Any]								=   model_class(__lowerCamelCase     )
                model.to(__lowerCamelCase     )
                model.train()
                _lowerCamelCase				:   Union[str, Any]								=   self._prepare_for_class(__lowerCamelCase,__lowerCamelCase,return_labels=__lowerCamelCase     )
                _lowerCamelCase				:   Dict								=   model(**__lowerCamelCase     ).loss
                loss.backward()



    def   lowerCamelCase_  (	self      :       Union[str, Any]     ):
          _lowerCamelCase				:   Optional[Any]								=   self.model_tester.prepare_config_and_inputs_for_common()
          if not self.model_tester.is_training:
                return

          _lowerCamelCase				:   Tuple								=   False
          _lowerCamelCase				:   Any								=   True

          for model_class in self.all_model_classes:
                if model_class in get_values(__lowerCamelCase     ) or not model_class.supports_gradient_checkpointing:
                      continue
                # DeiTForImageClassificationWithTeacher supports inference-only
                if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
                      continue
                _lowerCamelCase				:   List[str]								=   model_class(__lowerCamelCase     )
                model.gradient_checkpointing_enable()
                model.to(__lowerCamelCase     )
                model.train()
                _lowerCamelCase				:   Dict								=   self._prepare_for_class(__lowerCamelCase,__lowerCamelCase,return_labels=__lowerCamelCase     )
                _lowerCamelCase				:   Tuple								=   model(**__lowerCamelCase     ).loss
                loss.backward()



    def   lowerCamelCase_  (	self      :       str     ):
          _lowerCamelCase				:   Optional[Any]								=   self.model_tester.prepare_config_and_inputs_for_common()

          _lowerCamelCase				:   int								=   [
              {"title": "multi_label_classification", "num_labels": 2, "dtype": torch.float},
              {"title": "single_label_classification", "num_labels": 1, "dtype": torch.long},
              {"title": "regression", "num_labels": 1, "dtype": torch.float},
          ]

          for model_class in self.all_model_classes:
                if (
                    model_class
                    not in [
                        *get_values(__lowerCamelCase     ),
                        *get_values(__lowerCamelCase     ),
                    ]
                    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
                ):
                      continue

                for problem_type in problem_types:
                      with self.subTest(msg=f'Testing {model_class} with {problem_type["title"]}'     ):
                            _lowerCamelCase				:   Tuple								=   problem_type["title"]
                            _lowerCamelCase				:   Optional[Any]								=   problem_type["num_labels"]

                            _lowerCamelCase				:   List[str]								=   model_class(__lowerCamelCase     )
                            model.to(__lowerCamelCase     )
                            model.train()

                            _lowerCamelCase				:   List[Any]								=   self._prepare_for_class(__lowerCamelCase,__lowerCamelCase,return_labels=__lowerCamelCase     )

                            if problem_type["num_labels"] > 1:
                                  _lowerCamelCase				:   List[str]								=   inputs["labels"].unsqueeze(1     ).repeat(1,problem_type["num_labels"]     )

                            _lowerCamelCase				:   int								=   inputs["labels"].to(problem_type["dtype"]     )

                            # This tests that we do not trigger the warning form PyTorch "Using a target size that is different
                            # to the input size. This will likely lead to incorrect results due to broadcasting. Please ensure
                            # they have the same size." which is a symptom something in wrong for the regression problem.
                            # See https://github.com/huggingface/transformers/issues/11780
                            with warnings.catch_warnings(record=__lowerCamelCase     ) as warning_list:
                                  _lowerCamelCase				:   Optional[Any]								=   model(**__lowerCamelCase     ).loss
                            for w in warning_list:
                                  if "Using a target size that is different to the input size" in str(w.message     ):
                                        raise ValueError(
                                            f'Something is going wrong in the regression problem: intercepted {w.message}'     )

                            loss.backward()



    @slow
    def   lowerCamelCase_  (	self      :       List[Any]     ):
          for model_name in DEIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                _lowerCamelCase				:   Optional[Any]								=   DeiTModel.from_pretrained(__lowerCamelCase     )
                self.assertIsNotNone(__lowerCamelCase     )







def 		A_       (	):



      """simple docstring"""




      _lowerCamelCase				:   Optional[int]								=   Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"							)
      return image



@require_torch
@require_vision
class  UpperCAmelCase__						(       unittest.TestCase ):



    @cached_property
    def   lowerCamelCase_  (	self      :       Tuple     ):
          return (
              DeiTImageProcessor.from_pretrained("facebook/deit-base-distilled-patch16-224"     )
              if is_vision_available()
              else None
          )



    @slow
    def   lowerCamelCase_  (	self      :       Any     ):
          _lowerCamelCase				:   Optional[int]								=   DeiTForImageClassificationWithTeacher.from_pretrained("facebook/deit-base-distilled-patch16-224"     ).to(
              __lowerCamelCase     )

          _lowerCamelCase				:   List[Any]								=   self.default_image_processor
          _lowerCamelCase				:   List[Any]								=   prepare_img()
          _lowerCamelCase				:   Optional[Any]								=   image_processor(images=__lowerCamelCase,return_tensors="pt"     ).to(__lowerCamelCase     )

          # forward pass
          with torch.no_grad():
                _lowerCamelCase				:   List[str]								=   model(**__lowerCamelCase     )

          # verify the logits
          _lowerCamelCase				:   str								=   torch.Size((1, 1_0_0_0)     )
          self.assertEqual(outputs.logits.shape,__lowerCamelCase     )

          _lowerCamelCase				:   List[str]								=   torch.tensor([-1.0266, 0.1912, -1.2861]     ).to(__lowerCamelCase     )

          self.assertTrue(torch.allclose(outputs.logits[0, :3],__lowerCamelCase,atol=1e-4     )     )



    @slow
    @require_accelerate
    @require_torch_gpu
    def   lowerCamelCase_  (	self      :       Union[str, Any]     ):
          _lowerCamelCase				:   str								=   DeiTModel.from_pretrained(
              "facebook/deit-base-distilled-patch16-224",torch_dtype=torch.floataa,device_map="auto"     )
          _lowerCamelCase				:   Dict								=   self.default_image_processor

          _lowerCamelCase				:   Optional[int]								=   prepare_img()
          _lowerCamelCase				:   Union[str, Any]								=   image_processor(images=__lowerCamelCase,return_tensors="pt"     )
          _lowerCamelCase				:   Union[str, Any]								=   inputs.pixel_values.to(__lowerCamelCase     )

          # forward pass to make sure inference works in fp16
          with torch.no_grad():
                _lowerCamelCase				:   List[str]								=   model(__lowerCamelCase     )

'''simple docstring'''






import os
from shutil import copyfile
from typing import List, Optional, Tuple

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
 from .tokenization_albert import AlbertTokenizer
else:
 UpperCAmelCase_       :   Any   =       None

UpperCAmelCase_       :   Any   =       logging.get_logger(__name__)
UpperCAmelCase_       :   Optional[Any]   =       {'vocab_file': 'spiece.model', 'tokenizer_file': 'tokenizer.json'}

UpperCAmelCase_       :   List[Any]   =       {
    'vocab_file': {
        'albert-base-v1': 'https://huggingface.co/albert-base-v1/resolve/main/spiece.model',
        'albert-large-v1': 'https://huggingface.co/albert-large-v1/resolve/main/spiece.model',
        'albert-xlarge-v1': 'https://huggingface.co/albert-xlarge-v1/resolve/main/spiece.model',
        'albert-xxlarge-v1': 'https://huggingface.co/albert-xxlarge-v1/resolve/main/spiece.model',
        'albert-base-v2': 'https://huggingface.co/albert-base-v2/resolve/main/spiece.model',
        'albert-large-v2': 'https://huggingface.co/albert-large-v2/resolve/main/spiece.model',
        'albert-xlarge-v2': 'https://huggingface.co/albert-xlarge-v2/resolve/main/spiece.model',
        'albert-xxlarge-v2': 'https://huggingface.co/albert-xxlarge-v2/resolve/main/spiece.model',
    },
    'tokenizer_file': {
        'albert-base-v1': 'https://huggingface.co/albert-base-v1/resolve/main/tokenizer.json',
        'albert-large-v1': 'https://huggingface.co/albert-large-v1/resolve/main/tokenizer.json',
        'albert-xlarge-v1': 'https://huggingface.co/albert-xlarge-v1/resolve/main/tokenizer.json',
        'albert-xxlarge-v1': 'https://huggingface.co/albert-xxlarge-v1/resolve/main/tokenizer.json',
        'albert-base-v2': 'https://huggingface.co/albert-base-v2/resolve/main/tokenizer.json',
        'albert-large-v2': 'https://huggingface.co/albert-large-v2/resolve/main/tokenizer.json',
        'albert-xlarge-v2': 'https://huggingface.co/albert-xlarge-v2/resolve/main/tokenizer.json',
        'albert-xxlarge-v2': 'https://huggingface.co/albert-xxlarge-v2/resolve/main/tokenizer.json',
    },
}

UpperCAmelCase_       :   str   =       {
    'albert-base-v1': 512,
    'albert-large-v1': 512,
    'albert-xlarge-v1': 512,
    'albert-xxlarge-v1': 512,
    'albert-base-v2': 512,
    'albert-large-v2': 512,
    'albert-xlarge-v2': 512,
    'albert-xxlarge-v2': 512,
}

UpperCAmelCase_       :   str   =       '▁'

class  UpperCAmelCase__						(       A ):
    lowerCAmelCase_				    =		VOCAB_FILES_NAMES
    lowerCAmelCase_				    =		PRETRAINED_VOCAB_FILES_MAP
    lowerCAmelCase_				    =		PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    lowerCAmelCase_				    =		AlbertTokenizer



    def __init__(	self      :       Dict,__A      :       str=None,__A      :       Union[str, Any]=None,__A      :       Union[str, Any]=True,__A      :       int=True,__A      :       List[Any]=False,__A      :       Any="[CLS]",__A      :       List[str]="[SEP]",__A      :       Tuple="<unk>",__A      :       Dict="[SEP]",__A      :       Dict="<pad>",__A      :       List[str]="[CLS]",__A      :       Any="[MASK]",**__A      :       Tuple,):
          # Mask token behave like a normal word, i.e. include the space before it and
          # is included in the raw text, there should be a match in a non-normalized sentence.
          _lowerCamelCase				:   Union[str, Any]								=   (
              AddedToken(__A,lstrip=__A,rstrip=__A,normalized=__A     )
              if isinstance(__A,__A     )
              else mask_token
          )

          super().__init__(
              __A,tokenizer_file=__A,do_lower_case=__A,remove_space=__A,keep_accents=__A,bos_token=__A,eos_token=__A,unk_token=__A,sep_token=__A,pad_token=__A,cls_token=__A,mask_token=__A,**__A,)

          _lowerCamelCase				:   Dict								=   do_lower_case
          _lowerCamelCase				:   List[str]								=   remove_space
          _lowerCamelCase				:   Any								=   keep_accents
          _lowerCamelCase				:   Tuple								=   vocab_file
          _lowerCamelCase				:   Optional[int]								=   False if not self.vocab_file else True



    def   lowerCamelCase_  (	self      :       List[str],__A      :       List[int],__A      :       Optional[List[int]] = None     ):
          _lowerCamelCase				:   List[Any]								=   [self.sep_token_id]
          _lowerCamelCase				:   Any								=   [self.cls_token_id]
          if token_ids_a is None:
                return cls + token_ids_a + sep
          return cls + token_ids_a + sep + token_ids_a + sep



    def   lowerCamelCase_  (	self      :       List[str],__A      :       List[int],__A      :       Optional[List[int]] = None     ):
          _lowerCamelCase				:   Optional[Any]								=   [self.sep_token_id]
          _lowerCamelCase				:   Union[str, Any]								=   [self.cls_token_id]

          if token_ids_a is None:
                return len(cls + token_ids_a + sep     ) * [0]
          return len(cls + token_ids_a + sep     ) * [0] + len(token_ids_a + sep     ) * [1]



    def   lowerCamelCase_  (	self      :       str,__A      :       str,__A      :       Optional[str] = None     ):
          if not self.can_save_slow_tokenizer:
                raise ValueError(
                    "Your fast tokenizer does not have the necessary information to save the vocabulary for a slow "
                    "tokenizer."     )

          if not os.path.isdir(__A     ):
                logger.error(f'Vocabulary path ({save_directory}) should be a directory'     )
                return
          _lowerCamelCase				:   Union[str, Any]								=   os.path.join(
              __A,(filename_prefix + "-" if filename_prefix else "") + VOCAB_FILES_NAMES["vocab_file"]     )

          if os.path.abspath(self.vocab_file     ) != os.path.abspath(__A     ):
                copyfile(self.vocab_file,__A     )

          return (out_vocab_file,)