
"""simple docstring"""




import json
import os
import re
import unicodedata
from typing import Optional, Tuple

from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
from ...utils import logging


_A      :	Union[str, Any]       		=	logging.get_logger(__name__)

_A      :	Tuple       		=	{
    """vocab_file""": """vocab.json""",
    """merges_file""": """merges.txt""",
}

_A      :	List[Any]       		=	{
    """vocab_file""": {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/vocab.json"""},
    """merges_file""": {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/merges.txt"""},
}

_A      :	str       		=	{
    """openai-gpt""": 5_12,
}


def   __magic_name__     (				__snake_case    :	Optional[Any]  )			->    List[Any]:
       lowercase   :    Any			=							text.strip()
       if not text:
              return []
       lowercase   :    Tuple			=							text.split()
       return tokens

class 		a__						(				a_						):
   def __init__(      self     ,   _a=True     ,   _a=None     ,   _a=True     ,   _a=None     ,   _a=True     ,   ):
          if never_split is None:
                 lowercase   :    List[Any]			=							[]
          lowercase   :    Any			=							do_lower_case
          lowercase   :    Dict			=							set(_a    )
          lowercase   :    int			=							tokenize_chinese_chars
          lowercase   :    Optional[int]			=							strip_accents
          lowercase   :    Optional[int]			=							do_split_on_punc
   def       __magic_name__      (      self     ,   _a     ,   _a=None    ):
          lowercase   :    Union[str, Any]			=							self.never_split.union(set(_a    )    ) if never_split else self.never_split
          lowercase   :    Tuple			=							self._clean_text(_a    )

          # This was added on November 1st, 2018 for the multilingual and Chinese
          # models. This is also applied to the English models now, but it doesn't
          # matter since the English models were not trained on any Chinese data
          # and generally don't have any Chinese data in them (there are Chinese
          # characters in the vocabulary because Wikipedia does have some Chinese
          # words in the English Wikipedia.).
          if self.tokenize_chinese_chars:
                 lowercase   :    Tuple			=							self._tokenize_chinese_chars(_a    )
          # prevents treating the same character with different unicode codepoints as different characters
          lowercase   :    Optional[Any]			=							unicodedata.normalize("NFC"     ,   _a    )
          lowercase   :    Optional[Any]			=							whitespace_tokenize(_a    )
          lowercase   :    List[str]			=							[]
          for token in orig_tokens:
                 if token not in never_split:
                        if self.do_lower_case:
                               lowercase   :    List[str]			=							token.lower()
                               if self.strip_accents is not False:
                                      lowercase   :    Optional[Any]			=							self._run_strip_accents(_a    )
                        elif self.strip_accents:
                               lowercase   :    int			=							self._run_strip_accents(_a    )
                 split_tokens.extend(self._run_split_on_punc(_a     ,   _a    )    )

          lowercase   :    Union[str, Any]			=							whitespace_tokenize(" ".join(_a    )    )
          return output_tokens
   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    Any			=							unicodedata.normalize("NFD"     ,   _a    )
          lowercase   :    str			=							[]
          for char in text:
                 lowercase   :    Optional[int]			=							unicodedata.category(_a    )
                 if cat == "Mn":
                        continue
                 output.append(_a    )
          return "".join(_a    )
   def       __magic_name__      (      self     ,   _a     ,   _a=None    ):
          if not self.do_split_on_punc or (never_split is not None and text in never_split):
                 return [text]
          lowercase   :    Tuple			=							list(_a    )
          lowercase   :    Optional[Any]			=							0
          lowercase   :    Union[str, Any]			=							True
          lowercase   :    Any			=							[]
          while i < len(_a    ):
                 lowercase   :    List[Any]			=							chars[i]
                 if _is_punctuation(_a    ):
                        output.append([char]    )
                        lowercase   :    Any			=							True
                 else:
                        if start_new_word:
                               output.append([]    )
                        lowercase   :    int			=							False
                        output[-1].append(_a    )
                 i += 1

          return ["".join(_a    ) for x in output]
   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    Optional[int]			=							[]
          for char in text:
                 lowercase   :    Optional[int]			=							ord(_a    )
                 if self._is_chinese_char(_a    ):
                        output.append(" "    )
                        output.append(_a    )
                        output.append(" "    )
                 else:
                        output.append(_a    )
          return "".join(_a    )
   def       __magic_name__      (      self     ,   _a    ):
          # This defines a "chinese character" as anything in the CJK Unicode block:
          #   https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)
          #
          # Note that the CJK Unicode block is NOT all Japanese and Korean characters,
          # despite its name. The modern Korean Hangul alphabet is a different block,
          # as is Japanese Hiragana and Katakana. Those alphabets are used to write
          # space-separated words, so they are not treated specially and handled
          # like the all of the other languages.
          if (
              (cp >= 0X4E00 and cp <= 0X9FFF)
              or (cp >= 0X3400 and cp <= 0X4DBF)  #
              or (cp >= 0X2_0000 and cp <= 0X2_A6DF)  #
              or (cp >= 0X2_A700 and cp <= 0X2_B73F)  #
              or (cp >= 0X2_B740 and cp <= 0X2_B81F)  #
              or (cp >= 0X2_B820 and cp <= 0X2_CEAF)  #
              or (cp >= 0XF900 and cp <= 0XFAFF)
              or (cp >= 0X2_F800 and cp <= 0X2_FA1F)  #
          ):  #
                 return True

          return False

   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    int			=							[]
          for char in text:
                 lowercase   :    str			=							ord(_a    )
                 if cp == 0 or cp == 0XFFFD or _is_control(_a    ):
                        continue
                 if _is_whitespace(_a    ):
                        output.append(" "    )
                 else:
                        output.append(_a    )
          return "".join(_a    )


def   __magic_name__     (				__snake_case    :	int  )			->    int:
       lowercase   :    Dict			=							set()
       lowercase   :    Optional[Any]			=							word[0]
       for char in word[1:]:
              pairs.add((prev_char, char)  )
              lowercase   :    int			=							char
       return pairs


def   __magic_name__     (				__snake_case    :	Optional[Any]  )			->    int:
       lowercase   :    Dict			=							text.replace("—"					,			"-"  )
       lowercase   :    List[Any]			=							text.replace("–"					,			"-"  )
       lowercase   :    Tuple			=							text.replace("―"					,			"-"  )
       lowercase   :    int			=							text.replace("…"					,			"..."  )
       lowercase   :    List[Any]			=							text.replace("´"					,			"'"  )
       lowercase   :    Tuple			=							re.sub(r"(-+|~+|!+|\"+|;+|\?+|\++|,+|\)+|\(+|\\+|\/+|\*+|\[+|\]+|}+|{+|\|+|_+)"					,			r" \1 "					,			__snake_case  )
       lowercase   :    Dict			=							re.sub(r"\s*\n\s*"					,			" \n "					,			__snake_case  )
       lowercase   :    Optional[Any]			=							re.sub(r"[^\S\n]+"					,			" "					,			__snake_case  )
       return text.strip()

class 		a__						(				a_						):
   __lowerCAmelCase						=    VOCAB_FILES_NAMES
   __lowerCAmelCase						=    PRETRAINED_VOCAB_FILES_MAP
   __lowerCAmelCase						=    PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
   __lowerCAmelCase						=    ["""input_ids""", """attention_mask"""]
   def __init__(      self     ,   _a     ,   _a     ,   _a="<unk>"     ,   **_a    ):
          super().__init__(unk_token=_a     ,   **_a    )

          try:
                 import ftfy
                 from spacy.lang.en import English

                 lowercase   :    Tuple			=							English()
                 lowercase   :    Optional[int]			=							_nlp.tokenizer
                 lowercase   :    str			=							ftfy.fix_text
          except ImportError:
                 logger.warning("ftfy or spacy is not installed using BERT BasicTokenizer instead of SpaCy & ftfy."    )
                 lowercase   :    Dict			=							BasicTokenizer(do_lower_case=_a    )
                 lowercase   :    Dict			=							None

          with open(_a     ,   encoding="utf-8"    ) as vocab_handle:
                 lowercase   :    Any			=							json.load(_a    )
          lowercase   :    List[Any]			=							{v: k for k, v in self.encoder.items()}
          with open(_a     ,   encoding="utf-8"    ) as merges_handle:
                 lowercase   :    Union[str, Any]			=							merges_handle.read().split("\n"    )[1:-1]
          lowercase   :    List[str]			=							[tuple(merge.split()    ) for merge in merges]
          lowercase   :    Optional[int]			=							dict(zip(_a     ,   range(len(_a    )    )    )    )
          lowercase   :    List[Any]			=							{}
   @property
   def       __magic_name__      (      self    ):
          return True
   @property
   def       __magic_name__      (      self    ):
          return len(self.encoder    )
   def       __magic_name__      (      self    ):
          return dict(self.encoder     ,   **self.added_tokens_encoder    )
   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    Optional[Any]			=							tuple(token[:-1]    ) + (token[-1] + "</w>",)
          if token in self.cache:
                 return self.cache[token]
          lowercase   :    List[str]			=							get_pairs(_a    )

          if not pairs:
                 return token + "</w>"

          while True:
                 lowercase   :    str			=							min(_a     ,   key=lambda _a    : self.bpe_ranks.get(_a     ,   float("inf"    )    )    )
                 if bigram not in self.bpe_ranks:
                        break
                 lowercase		,   lowercase   :    List[str]			=							bigram
                 lowercase   :    Optional[int]			=							[]
                 lowercase   :    int			=							0
                 while i < len(_a    ):
                        try:
                               lowercase   :    Optional[int]			=							word.index(_a     ,   _a    )
                        except ValueError:
                               new_word.extend(word[i:]    )
                               break
                        else:
                               new_word.extend(word[i:j]    )
                               lowercase   :    Tuple			=							j

                        if word[i] == first and i < len(_a    ) - 1 and word[i + 1] == second:
                               new_word.append(first + second    )
                               i += 2
                        else:
                               new_word.append(word[i]    )
                               i += 1
                 lowercase   :    Optional[Any]			=							tuple(_a    )
                 lowercase   :    Dict			=							new_word
                 if len(_a    ) == 1:
                        break
                 else:
                        lowercase   :    Optional[int]			=							get_pairs(_a    )
          lowercase   :    str			=							" ".join(_a    )
          if word == "\n  </w>":
                 lowercase   :    List[str]			=							"\n</w>"
          lowercase   :    str			=							word
          return word
   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    Tuple			=							[]
          if self.fix_text is None:
                 # Using BERT's BasicTokenizer
                 lowercase   :    Tuple			=							self.nlp.tokenize(_a    )
                 for token in text:
                        split_tokens.extend(list(self.bpe(_a    ).split(" "    )    )    )
          else:
                 # Using SpaCy & ftfy (original tokenization process of OpenAI GPT)
                 lowercase   :    List[str]			=							self.nlp(text_standardize(self.fix_text(_a    )    )    )
                 for token in text:
                        split_tokens.extend(list(self.bpe(token.text.lower()    ).split(" "    )    )    )
          return split_tokens
   def       __magic_name__      (      self     ,   _a    ):
          return self.encoder.get(_a     ,   self.encoder.get(self.unk_token    )    )
   def       __magic_name__      (      self     ,   _a    ):
          return self.decoder.get(_a     ,   self.unk_token    )
   def       __magic_name__      (      self     ,   _a    ):
          lowercase   :    Optional[Any]			=							"".join(_a    ).replace("</w>"     ,   " "    ).strip()
          return out_string

   def       __magic_name__      (      self     ,   _a     ,   _a = None    ):
          if not os.path.isdir(_a    ):
                 logger.error(f"""Vocabulary path ({save_directory}) should be a directory"""    )
                 return
          lowercase   :    List[str]			=							os.path.join(
              _a     ,   (filename_prefix + "-" if filename_prefix else "") + VOCAB_FILES_NAMES["vocab_file"]    )
          lowercase   :    str			=							os.path.join(
              _a     ,   (filename_prefix + "-" if filename_prefix else "") + VOCAB_FILES_NAMES["merges_file"]    )

          with open(_a     ,   "w"     ,   encoding="utf-8"    ) as f:
                 f.write(json.dumps(self.encoder     ,   indent=2     ,   sort_keys=_a     ,   ensure_ascii=_a    ) + "\n"    )

          lowercase   :    Dict			=							0
          with open(_a     ,   "w"     ,   encoding="utf-8"    ) as writer:
                 writer.write("#version: 0.2\n"    )
                 for bpe_tokens, token_index in sorted(self.bpe_ranks.items()     ,   key=lambda _a    : kv[1]    ):
                        if index != token_index:
                               logger.warning(
                                   f"""Saving vocabulary to {merge_file}: BPE merge indices are not consecutive."""
                                   " Please check that the tokenizer is not corrupted!"    )
                               lowercase   :    Optional[Any]			=							token_index
                        writer.write(" ".join(_a    ) + "\n"    )
                        index += 1

          return vocab_file, merge_file




"""simple docstring"""




from __future__ import annotations

import inspect
import unittest
from typing import List, Tuple

from transformers import ConvNextConfig
from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import cached_property, is_tf_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
   import tensorflow as tf

   from transformers import TFConvNextForImageClassification, TFConvNextModel


if is_vision_available():
   from PIL import Image

   from transformers import ConvNextImageProcessor

class 		a__						:
   def __init__(      self     ,   _a     ,   _a=13     ,   _a=32     ,   _a=3     ,   _a=4     ,   _a=[10, 20, 30, 40]     ,   _a=[2, 2, 3, 2]     ,   _a=True     ,   _a=True     ,   _a=37     ,   _a="gelu"     ,   _a=10     ,   _a=0.0_2     ,   _a=3     ,   _a=None     ,   ):
          lowercase   :    Any			=							parent
          lowercase   :    Optional[int]			=							batch_size
          lowercase   :    Optional[Any]			=							image_size
          lowercase   :    Any			=							num_channels
          lowercase   :    str			=							num_stages
          lowercase   :    Union[str, Any]			=							hidden_sizes
          lowercase   :    Optional[Any]			=							depths
          lowercase   :    str			=							is_training
          lowercase   :    int			=							use_labels
          lowercase   :    str			=							intermediate_size
          lowercase   :    Dict			=							hidden_act
          lowercase   :    int			=							type_sequence_label_size
          lowercase   :    Optional[int]			=							initializer_range
          lowercase   :    Dict			=							scope
   def       __magic_name__      (      self    ):
          lowercase   :    Optional[Any]			=							floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]    )

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

          lowercase   :    str			=							self.get_config()

          return config, pixel_values, labels
   def       __magic_name__      (      self    ):
          return ConvNextConfig(
              num_channels=self.num_channels     ,   hidden_sizes=self.hidden_sizes     ,   depths=self.depths     ,   num_stages=self.num_stages     ,   hidden_act=self.hidden_act     ,   is_decoder=_a     ,   initializer_range=self.initializer_range     ,   )
   def       __magic_name__      (      self     ,   _a     ,   _a     ,   _a    ):
          lowercase   :    Any			=							TFConvNextModel(config=_a    )
          lowercase   :    int			=							model(_a     ,   training=_a    )
          # expected last hidden states: B, C, H // 32, W // 32
          self.parent.assertEqual(
              result.last_hidden_state.shape     ,   (self.batch_size, self.hidden_sizes[-1], self.image_size // 32, self.image_size // 32)     ,   )
   def       __magic_name__      (      self     ,   _a     ,   _a     ,   _a    ):
          lowercase   :    List[Any]			=							self.type_sequence_label_size
          lowercase   :    List[str]			=							TFConvNextForImageClassification(_a    )
          lowercase   :    int			=							model(_a     ,   labels=_a     ,   training=_a    )
          self.parent.assertEqual(result.logits.shape     ,   (self.batch_size, self.type_sequence_label_size)    )

   def       __magic_name__      (      self    ):
          lowercase   :    Union[str, Any]			=							self.prepare_config_and_inputs()
          lowercase		,   lowercase		,   lowercase   :    str			=							config_and_inputs
          lowercase   :    List[Any]			=							{"pixel_values": pixel_values}
          return config, inputs_dict


@require_tf
class 		a__						(				a_,      a_,      unittest.TestCase						):
   __lowerCAmelCase						=    (TFConvNextModel, TFConvNextForImageClassification) if is_tf_available() else ()
   __lowerCAmelCase						=    (
       {"""feature-extraction""": TFConvNextModel, """image-classification""": TFConvNextForImageClassification}
       if is_tf_available()
       else {}
   )

   __lowerCAmelCase						=    False
   __lowerCAmelCase						=    False
   __lowerCAmelCase						=    False
   __lowerCAmelCase						=    False
   __lowerCAmelCase						=    False
   def       __magic_name__      (      self    ):
          lowercase   :    Tuple			=							TFConvNextModelTester(self    )
          lowercase   :    int			=							ConfigTester(
              self     ,   config_class=_a     ,   has_text_modality=_a     ,   hidden_size=37     ,   )
   @unittest.skip(reason="ConvNext does not use inputs_embeds"    )
   def       __magic_name__      (      self    ):
          pass
   @unittest.skipIf(
       not is_tf_available() or len(tf.config.list_physical_devices("GPU"    )    ) == 0     ,   reason="TF does not support backprop for grouped convolutions on CPU."     ,   )
   @slow
   def       __magic_name__      (      self    ):
          super().test_keras_fit()
   @unittest.skip(reason="ConvNext does not support input and output embeddings"    )
   def       __magic_name__      (      self    ):
          pass
   def       __magic_name__      (      self    ):
          lowercase		,   lowercase   :    List[str]			=							self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
                 lowercase   :    Dict			=							model_class(_a    )
                 lowercase   :    str			=							inspect.signature(model.call    )
                 # signature.parameters is an OrderedDict => so arg_names order is deterministic
                 lowercase   :    Optional[int]			=							[*signature.parameters.keys()]

                 lowercase   :    Optional[Any]			=							["pixel_values"]
                 self.assertListEqual(arg_names[:1]     ,   _a    )
   def       __magic_name__      (      self    ):
          lowercase   :    Union[str, Any]			=							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*_a    )
   @unittest.skipIf(
       not is_tf_available() or len(tf.config.list_physical_devices("GPU"    )    ) == 0     ,   reason="TF does not support backprop for grouped convolutions on CPU."     ,   )
   def       __magic_name__      (      self    ):
          super().test_dataset_conversion()
   def       __magic_name__      (      self    ):
          def check_hidden_states_output(_a     ,   _a     ,   _a    ):
                 lowercase   :    str			=							model_class(_a    )

                 lowercase   :    Any			=							model(**self._prepare_for_class(_a     ,   _a    )    )
                 lowercase   :    Optional[Any]			=							outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

                 lowercase   :    str			=							self.model_tester.num_stages
                 self.assertEqual(len(_a    )     ,   expected_num_stages + 1    )

                 # ConvNext's feature maps are of shape (batch_size, num_channels, height, width)
                 self.assertListEqual(
                     list(hidden_states[0].shape[-2:]    )     ,   [self.model_tester.image_size // 4, self.model_tester.image_size // 4]     ,   )

          lowercase		,   lowercase   :    Any			=							self.model_tester.prepare_config_and_inputs_for_common()

          for model_class in self.all_model_classes:
                 lowercase   :    Union[str, Any]			=							True
                 check_hidden_states_output(_a     ,   _a     ,   _a    )

                 # check that output_hidden_states also work using config
                 del inputs_dict["output_hidden_states"]
                 lowercase   :    Dict			=							True

                 check_hidden_states_output(_a     ,   _a     ,   _a    )
   def       __magic_name__      (      self    ):
          lowercase		,   lowercase   :    List[str]			=							self.model_tester.prepare_config_and_inputs_for_common()

          def check_equivalence(_a     ,   _a     ,   _a     ,   _a={}    ):
                 lowercase   :    Union[str, Any]			=							model(_a     ,   return_dict=_a     ,   **_a    )
                 lowercase   :    Dict			=							model(_a     ,   return_dict=_a     ,   **_a    ).to_tuple()

                 def recursive_check(_a     ,   _a    ):
                        if isinstance(_a     ,   (List, Tuple)    ):
                               for tuple_iterable_value, dict_iterable_value in zip(_a     ,   _a    ):
                                      recursive_check(_a     ,   _a    )
                        elif tuple_object is None:
                               return
                        else:
                               self.assertTrue(
                                   all(tf.equal(_a     ,   _a    )    )     ,   msg=(
                                       "Tuple and dict output are not equal. Difference:"
                                       f""" {tf.math.reduce_max(tf.abs(tuple_object - dict_object    )    )}"""
                                   )     ,   )

                        recursive_check(_a     ,   _a    )

          for model_class in self.all_model_classes:
                 lowercase   :    str			=							model_class(_a    )

                 lowercase   :    int			=							self._prepare_for_class(_a     ,   _a    )
                 lowercase   :    Dict			=							self._prepare_for_class(_a     ,   _a    )
                 check_equivalence(_a     ,   _a     ,   _a    )

                 lowercase   :    Tuple			=							self._prepare_for_class(_a     ,   _a     ,   return_labels=_a    )
                 lowercase   :    Union[str, Any]			=							self._prepare_for_class(_a     ,   _a     ,   return_labels=_a    )
                 check_equivalence(_a     ,   _a     ,   _a    )

                 lowercase   :    Any			=							self._prepare_for_class(_a     ,   _a    )
                 lowercase   :    List[str]			=							self._prepare_for_class(_a     ,   _a    )
                 check_equivalence(_a     ,   _a     ,   _a     ,   {"output_hidden_states": True}    )

                 lowercase   :    Union[str, Any]			=							self._prepare_for_class(_a     ,   _a     ,   return_labels=_a    )
                 lowercase   :    Optional[Any]			=							self._prepare_for_class(_a     ,   _a     ,   return_labels=_a    )
                 check_equivalence(_a     ,   _a     ,   _a     ,   {"output_hidden_states": True}    )
   def       __magic_name__      (      self    ):
          lowercase   :    int			=							self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_image_classification(*_a    )

   @slow
   def       __magic_name__      (      self    ):
          lowercase   :    Tuple			=							TFConvNextModel.from_pretrained("facebook/convnext-tiny-224"    )
          self.assertIsNotNone(_a    )


def   __magic_name__     (				)			->    Any:
       lowercase   :    List[str]			=							Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"  )
       return image

@require_tf
@require_vision
class 		a__						(				unittest.TestCase						):
   @cached_property
   def       __magic_name__      (      self    ):
          return ConvNextImageProcessor.from_pretrained("facebook/convnext-tiny-224"    ) if is_vision_available() else None

   @slow
   def       __magic_name__      (      self    ):
          lowercase   :    Dict			=							TFConvNextForImageClassification.from_pretrained("facebook/convnext-tiny-224"    )

          lowercase   :    List[str]			=							self.default_image_processor
          lowercase   :    List[str]			=							prepare_img()
          lowercase   :    Union[str, Any]			=							image_processor(images=_a     ,   return_tensors="tf"    )

          # forward pass
          lowercase   :    str			=							model(**_a    )

          # verify the logits
          lowercase   :    List[str]			=							tf.TensorShape((1, 1_000)    )
          self.assertEqual(outputs.logits.shape     ,   _a    )

          lowercase   :    int			=							tf.constant([-0.0_2_6_0, -0.4_7_3_9, 0.1_9_1_1]    )

          tf.debugging.assert_near(outputs.logits[0, :3]     ,   _a     ,   atol=1E-4    )


