


from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow


if is_tf_available():
    import numpy as np
    import tensorflow as tf

    from transformers import TFXLMRobertaModel

@require_tf
@require_sentencepiece
@require_tokenizers
class 							lowercase  (						unittest.TestCase			):







     @slow
     def 							lowercase__       (						self :						List[str]      ):
           SCREAMING_SNAKE_CASE__       :  Union[str, Any]						     =		TFXLMRobertaModel.from_pretrained('''jplu/tf-xlm-roberta-base'''      )

           SCREAMING_SNAKE_CASE__       :  Tuple						     =		{
               '''input_ids''': tf.convert_to_tensor([[0, 26_46, 1_02_69, 83, 9_99_42, 2]]   ,   dtype=tf.intaa      ),  # "My dog is cute"
               '''attention_mask''': tf.convert_to_tensor([[1, 1, 1, 1, 1, 1]]   ,   dtype=tf.intaa      ),
           }

           SCREAMING_SNAKE_CASE__       :  List[str]						     =		model(_lowercase      )['''last_hidden_state''']
           SCREAMING_SNAKE_CASE__       :  Optional[int]						     =		tf.TensorShape((1, 6, 7_68)      )
           self.assertEqual(output.shape   ,   _lowercase      )
           # compare the actual values for a slice.
           SCREAMING_SNAKE_CASE__       :  Dict						     =		tf.convert_to_tensor(
               [
                   [
                       [0.0681762, 0.10894451, 0.06772504],
                       [-0.06423668, 0.02366615, 0.04329344],
                       [-0.06057295, 0.09974135, -0.00070584],
                   ]
               ]   ,   dtype=tf.floataa   ,   )

           self.assertTrue(np.allclose(output[:, :3, :3].numpy()   ,   expected_slice.numpy()   ,   atol=1E-4      )      )











def 		a__      (		_UpperCamelCase      :			int			,_UpperCamelCase      :			int				):
   while second != 0:
      __lowerCamelCase    				=     first & second
      first ^= second
      __lowerCamelCase    				=     c << 1
   return first


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  a_								=       int(input("""Enter the first number: """).strip())
  a_								=       int(input("""Enter the second number: """).strip())
  print(f"{add(first, second) = }")






