





'''simple docstring'''






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 TFCamembertModel




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




      @slow
      def     lowercase__   (      self      :			List[str]  )    ->				Optional[int]:
            _lowerCAmelCase												=							TFCamembertModel.from_pretrained("""jplu/tf-camembert-base"""  )

            _lowerCAmelCase												=							tf.convert_to_tensor(
                [[5, 1_21, 11, 6_60, 16, 7_30, 2_55_43, 1_10, 83, 6]]      ,      dtype=tf.intaa      ,      )  # J'aime le camembert !"

            _lowerCAmelCase												=							model(__snake_case  )["""last_hidden_state"""]
            _lowerCAmelCase												=							tf.TensorShape((1, 10, 7_68)  )
            self.assertEqual(output.shape      ,      __snake_case  )
            # compare the actual values for a slice.
            _lowerCAmelCase												=							tf.convert_to_tensor(
                [[[-0.02_54, 0.02_35, 0.10_27], [0.06_06, -0.18_11, -0.04_18], [-0.15_61, -0.11_27, 0.26_87]]]      ,      dtype=tf.floataa      ,      )
            # camembert = torch.hub.load('pytorch/fairseq', 'camembert.v0')
            # camembert.eval()
            # expected_slice = roberta.model.forward(input_ids)[0][:, :3, :3].detach()

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









'''simple docstring'''






def        UpperCamelCase__				(		lowerCAmelCase = 4_00_00_00  ):





      """simple docstring"""


      _lowerCAmelCase												=							[]
      _lowerCAmelCase					,							_lowerCAmelCase												=							0, 1
      while b <= n:
            if b % 2 == 0:
                  even_fibs.append(lowerCAmelCase  )
            _lowerCAmelCase					,							_lowerCAmelCase												=							b, a + b
      return sum(lowerCAmelCase  )


if __name__ == "__main__":
      print(F"""{solution() = }""")






