





import inspect
import unittest

from transformers import SegformerConfig, is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, slow, torch_device

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 transformers import (
       MODEL_MAPPING,
       SegformerForImageClassification,
       SegformerForSemanticSegmentation,
       SegformerModel,
   )
   from transformers.models.segformer.modeling_segformer import SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
   from PIL import Image

   from transformers import SegformerImageProcessor




class        _a    (    _snake_case):

      """simple docstring"""


      def 			UpperCAmelCase_       (		self:			str					):
          '''simple docstring'''


          UpperCamelCase__:	Optional[Any]					=     self.config_class(**self.inputs_dict					)
          self.parent.assertTrue(hasattr(UpperCamelCase__	,    "hidden_sizes"					)					)
          self.parent.assertTrue(hasattr(UpperCamelCase__	,    "num_attention_heads"					)					)
          self.parent.assertTrue(hasattr(UpperCamelCase__	,    "num_encoder_blocks"					)					)




class        _a    :

      """simple docstring"""


      def __init__(		self:			str	,    __lowerCamelCase:			Any	,    __lowerCamelCase:			Optional[int]=13	,    __lowerCamelCase:			int=64	,    __lowerCamelCase:			Optional[int]=3	,    __lowerCamelCase:			Any=4	,    __lowerCamelCase:			Union[str, Any]=[2, 2, 2, 2]	,    __lowerCamelCase:			List[str]=[8, 4, 2, 1]	,    __lowerCamelCase:			Optional[int]=[16, 32, 64, 128]	,    __lowerCamelCase:			Optional[Any]=[1, 4, 8, 16]	,    __lowerCamelCase:			Optional[int]=[1, 2, 4, 8]	,    __lowerCamelCase:			List[str]=True	,    __lowerCamelCase:			Optional[Any]=True	,    __lowerCamelCase:			int="gelu"	,    __lowerCamelCase:			Optional[Any]=0.1	,    __lowerCamelCase:			Union[str, Any]=0.1	,    __lowerCamelCase:			Optional[Any]=0.02	,    __lowerCamelCase:			Dict=3	,    __lowerCamelCase:			Tuple=None	,    ):
          '''simple docstring'''


          UpperCamelCase__:	Any					=     parent
          UpperCamelCase__:	Optional[int]					=     batch_size
          UpperCamelCase__:	List[Any]					=     image_size
          UpperCamelCase__:	List[str]					=     num_channels
          UpperCamelCase__:	str					=     num_encoder_blocks
          UpperCamelCase__:	Optional[int]					=     sr_ratios
          UpperCamelCase__:	List[Any]					=     depths
          UpperCamelCase__:	Optional[Any]					=     hidden_sizes
          UpperCamelCase__:	Any					=     downsampling_rates
          UpperCamelCase__:	List[Any]					=     num_attention_heads
          UpperCamelCase__:	Any					=     is_training
          UpperCamelCase__:	Tuple					=     use_labels
          UpperCamelCase__:	Any					=     hidden_act
          UpperCamelCase__:	Dict					=     hidden_dropout_prob
          UpperCamelCase__:	str					=     attention_probs_dropout_prob
          UpperCamelCase__:	Optional[Any]					=     initializer_range
          UpperCamelCase__:	List[Any]					=     num_labels
          UpperCamelCase__:	Optional[int]					=     scope






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Dict					=     floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]					)

          UpperCamelCase__:	str					=     None
          if self.use_labels:
              UpperCamelCase__:	List[Any]					=     ids_tensor([self.batch_size, self.image_size, self.image_size]	,    self.num_labels					)

          UpperCamelCase__:	Any					=     self.get_config()
          return config, pixel_values, labels






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          return SegformerConfig(
              image_size=self.image_size	,    num_channels=self.num_channels	,    num_encoder_blocks=self.num_encoder_blocks	,    depths=self.depths	,    hidden_sizes=self.hidden_sizes	,    num_attention_heads=self.num_attention_heads	,    hidden_act=self.hidden_act	,    hidden_dropout_prob=self.hidden_dropout_prob	,    attention_probs_dropout_prob=self.attention_probs_dropout_prob	,    initializer_range=self.initializer_range	,    )






      def 			UpperCAmelCase_       (		self:			List[Any]	,    __lowerCamelCase:			Optional[Any]	,    __lowerCamelCase:			Any	,    __lowerCamelCase:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Any					=     SegformerModel(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	Union[str, Any]					=     model(UpperCamelCase__					)
          UpperCamelCase__:	Tuple					=     self.image_size // (self.downsampling_rates[-1] * 2)
          self.parent.assertEqual(
              result.last_hidden_state.shape	,    (self.batch_size, self.hidden_sizes[-1], expected_height, expected_width)					)






      def 			UpperCAmelCase_       (		self:			Any	,    __lowerCamelCase:			Optional[Any]	,    __lowerCamelCase:			Dict	,    __lowerCamelCase:			Optional[int]					):
          '''simple docstring'''


          UpperCamelCase__:	int					=     self.num_labels
          UpperCamelCase__:	Dict					=     SegformerForSemanticSegmentation(UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	List[Any]					=     model(UpperCamelCase__					)
          self.parent.assertEqual(
              result.logits.shape	,    (self.batch_size, self.num_labels, self.image_size // 4, self.image_size // 4)					)
          UpperCamelCase__:	Optional[int]					=     model(UpperCamelCase__	,    labels=UpperCamelCase__					)
          self.parent.assertEqual(
              result.logits.shape	,    (self.batch_size, self.num_labels, self.image_size // 4, self.image_size // 4)					)
          self.parent.assertGreater(result.loss	,    0.0					)






      def 			UpperCAmelCase_       (		self:			Dict	,    __lowerCamelCase:			Dict	,    __lowerCamelCase:			str	,    __lowerCamelCase:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	List[Any]					=     1
          UpperCamelCase__:	Any					=     SegformerForSemanticSegmentation(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	Optional[int]					=     torch.randint(0	,    1	,    (self.batch_size, self.image_size, self.image_size)					).to(UpperCamelCase__					)
          UpperCamelCase__:	Union[str, Any]					=     model(UpperCamelCase__	,    labels=UpperCamelCase__					)
          self.parent.assertGreater(result.loss	,    0.0					)






      def 			UpperCAmelCase_       (		self:			int					):
          '''simple docstring'''


          UpperCamelCase__:	Optional[Any]					=     self.prepare_config_and_inputs()
          UpperCamelCase__				, UpperCamelCase__				, UpperCamelCase__:	str					=     config_and_inputs
          UpperCamelCase__:	Dict					=     {"pixel_values": pixel_values}
          return config, inputs_dict




@require_torch
class        _a    (    _snake_case						,			_snake_case						,			unittest.TestCase):

      """simple docstring"""


      UpperCamelCase__  		=       (
          (
              SegformerModel,
              SegformerForSemanticSegmentation,
              SegformerForImageClassification,
          )
          if is_torch_available()
          else ()
      )
      UpperCamelCase__  		=       (
          {
              """feature-extraction""": SegformerModel,
              """image-classification""": SegformerForImageClassification,
              """image-segmentation""": SegformerForSemanticSegmentation,
          }
          if is_torch_available()
          else {}
      )

      UpperCamelCase__  		=       True
      UpperCamelCase__  		=       False
      UpperCamelCase__  		=       False
      UpperCamelCase__  		=       False






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Optional[int]					=     SegformerModelTester(self					)
          UpperCamelCase__:	List[str]					=     SegformerConfigTester(self	,    config_class=UpperCamelCase__					)






      def 			UpperCAmelCase_       (		self:			Tuple					):
          '''simple docstring'''


          self.config_tester.run_common_tests()






      def 			UpperCAmelCase_       (		self:			Tuple					):
          '''simple docstring'''


          UpperCamelCase__:	Tuple					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*UpperCamelCase__					)






      def 			UpperCAmelCase_       (		self:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Tuple					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_binary_image_segmentation(*UpperCamelCase__					)






      def 			UpperCAmelCase_       (		self:			List[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	str					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_image_segmentation(*UpperCamelCase__					)






      @unittest.skip("SegFormer does not use inputs_embeds"					)
      def 			UpperCAmelCase_       (		self:			str					):
          '''simple docstring'''


          pass






      @unittest.skip("SegFormer does not have get_input_embeddings method and get_output_embeddings methods"					)
      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          pass






      def 			UpperCAmelCase_       (		self:			Dict					):
          '''simple docstring'''


          UpperCamelCase__				, UpperCamelCase__:	List[str]					=     self.model_tester.prepare_config_and_inputs_for_common()

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

              UpperCamelCase__:	Optional[Any]					=     ["pixel_values"]
              self.assertListEqual(arg_names[:1]	,    UpperCamelCase__					)






      def 			UpperCAmelCase_       (		self:			Optional[int]					):
          '''simple docstring'''


          UpperCamelCase__				, UpperCamelCase__:	List[str]					=     self.model_tester.prepare_config_and_inputs_for_common()
          UpperCamelCase__:	List[Any]					=     True

          for model_class in self.all_model_classes:
              UpperCamelCase__:	int					=     True
              UpperCamelCase__:	List[Any]					=     False
              UpperCamelCase__:	Tuple					=     True
              UpperCamelCase__:	str					=     model_class(UpperCamelCase__					)
              model.to(UpperCamelCase__					)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase__:	Union[str, Any]					=     model(**self._prepare_for_class(UpperCamelCase__	,    UpperCamelCase__					)					)
              UpperCamelCase__:	int					=     outputs.attentions

              UpperCamelCase__:	str					=     sum(self.model_tester.depths					)
              self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)

              # check that output_attentions also work using config
              del inputs_dict["output_attentions"]
              UpperCamelCase__:	Optional[Any]					=     True
              UpperCamelCase__:	Any					=     model_class(UpperCamelCase__					)
              model.to(UpperCamelCase__					)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase__:	int					=     model(**self._prepare_for_class(UpperCamelCase__	,    UpperCamelCase__					)					)
              UpperCamelCase__:	Any					=     outputs.attentions

              self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)

              # verify the first attentions (first block, first layer)
              UpperCamelCase__:	List[str]					=     (self.model_tester.image_size // 4) ** 2
              UpperCamelCase__:	Optional[int]					=     (self.model_tester.image_size // (4 * self.model_tester.sr_ratios[0])) ** 2
              self.assertListEqual(
                  list(attentions[0].shape[-3:]					)	,    [self.model_tester.num_attention_heads[0], expected_seq_len, expected_reduced_seq_len]	,    )

              # verify the last attentions (last block, last layer)
              UpperCamelCase__:	List[Any]					=     (self.model_tester.image_size // 32) ** 2
              UpperCamelCase__:	Dict					=     (self.model_tester.image_size // (32 * self.model_tester.sr_ratios[-1])) ** 2
              self.assertListEqual(
                  list(attentions[-1].shape[-3:]					)	,    [self.model_tester.num_attention_heads[-1], expected_seq_len, expected_reduced_seq_len]	,    )
              UpperCamelCase__:	Any					=     len(UpperCamelCase__					)

              # Check attention is always last and order is fine
              UpperCamelCase__:	Union[str, Any]					=     True
              UpperCamelCase__:	Any					=     True
              UpperCamelCase__:	str					=     model_class(UpperCamelCase__					)
              model.to(UpperCamelCase__					)
              model.eval()
              with torch.no_grad():
                  UpperCamelCase__:	Optional[Any]					=     model(**self._prepare_for_class(UpperCamelCase__	,    UpperCamelCase__					)					)

              self.assertEqual(out_len + 1	,    len(UpperCamelCase__					)					)

              UpperCamelCase__:	str					=     outputs.attentions

              self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)
              # verify the first attentions (first block, first layer)
              UpperCamelCase__:	Tuple					=     (self.model_tester.image_size // 4) ** 2
              UpperCamelCase__:	Optional[int]					=     (self.model_tester.image_size // (4 * self.model_tester.sr_ratios[0])) ** 2
              self.assertListEqual(
                  list(self_attentions[0].shape[-3:]					)	,    [self.model_tester.num_attention_heads[0], expected_seq_len, expected_reduced_seq_len]	,    )






      def 			UpperCAmelCase_       (		self:			Dict					):
          '''simple docstring'''


          def check_hidden_states_output(__lowerCamelCase:			int	,    __lowerCamelCase:			Dict	,    __lowerCamelCase:			Union[str, Any]					):
              UpperCamelCase__:	Tuple					=     model_class(UpperCamelCase__					)
              model.to(UpperCamelCase__					)
              model.eval()

              with torch.no_grad():
                  UpperCamelCase__:	int					=     model(**self._prepare_for_class(UpperCamelCase__	,    UpperCamelCase__					)					)

              UpperCamelCase__:	Tuple					=     outputs.hidden_states

              UpperCamelCase__:	List[Any]					=     self.model_tester.num_encoder_blocks
              self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)

              # verify the first hidden states (first block)
              self.assertListEqual(
                  list(hidden_states[0].shape[-3:]					)	,    [
                      self.model_tester.hidden_sizes[0],
                      self.model_tester.image_size // 4,
                      self.model_tester.image_size // 4,
                  ]	,    )

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

          for model_class in self.all_model_classes:
              UpperCamelCase__:	Dict					=     True
              check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__					)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              UpperCamelCase__:	List[Any]					=     True

              check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__					)






      def 			UpperCAmelCase_       (		self:			Union[str, Any]					):
          '''simple docstring'''


          if not self.model_tester.is_training:
              return

          UpperCamelCase__				, UpperCamelCase__:	Union[str, Any]					=     self.model_tester.prepare_config_and_inputs_for_common()
          UpperCamelCase__:	Any					=     True

          for model_class in self.all_model_classes:
              if model_class in get_values(UpperCamelCase__					):
                  continue

              UpperCamelCase__:	List[str]					=     model_class(UpperCamelCase__					)
              model.to(UpperCamelCase__					)
              model.train()
              UpperCamelCase__:	List[str]					=     self._prepare_for_class(UpperCamelCase__	,    UpperCamelCase__	,    return_labels=UpperCamelCase__					)
              UpperCamelCase__:	List[Any]					=     model(**UpperCamelCase__					).loss
              loss.backward()






      @unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."					)
      def 			UpperCAmelCase_       (		self:			Dict					):
          '''simple docstring'''


          pass






      @slow
      def 			UpperCAmelCase_       (		self:			Optional[int]					):
          '''simple docstring'''


          for model_name in SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              UpperCamelCase__:	Any					=     SegformerModel.from_pretrained(UpperCamelCase__					)
              self.assertIsNotNone(UpperCamelCase__					)



def 				lowerCAmelCase_ (							):
    UpperCamelCase__:	List[Any]					=     Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png")
    return image




@require_torch
class        _a    (    unittest.TestCase):

      """simple docstring"""


      @slow
      def 			UpperCAmelCase_       (		self:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Tuple					=     SegformerImageProcessor(
              image_scale=(512, 512)	,    keep_ratio=UpperCamelCase__	,    align=UpperCamelCase__	,    do_random_crop=UpperCamelCase__					)
          UpperCamelCase__:	Optional[int]					=     SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512"					).to(
              UpperCamelCase__					)

          UpperCamelCase__:	Any					=     prepare_img()
          UpperCamelCase__:	int					=     image_processor(images=UpperCamelCase__	,    return_tensors="pt"					)
          UpperCamelCase__:	List[str]					=     encoded_inputs.pixel_values.to(UpperCamelCase__					)

          with torch.no_grad():
              UpperCamelCase__:	Union[str, Any]					=     model(UpperCamelCase__					)

          UpperCamelCase__:	Any					=     torch.Size((1, model.config.num_labels, 128, 128)					)
          self.assertEqual(outputs.logits.shape	,    UpperCamelCase__					)

          UpperCamelCase__:	Optional[int]					=     torch.tensor(
              [
                  [[-4.6_310, -5.5_232, -6.2_356], [-5.1_921, -6.1_444, -6.5_996], [-5.4_424, -6.2_790, -6.7_574]],
                  [[-12.1_391, -13.3_122, -13.9_554], [-12.8_732, -13.9_352, -14.3_563], [-12.9_438, -13.8_226, -14.2_513]],
                  [[-12.5_134, -13.4_686, -14.4_915], [-12.8_669, -14.4_343, -14.7_758], [-13.2_523, -14.5_819, -15.0_694]],
              ]					).to(UpperCamelCase__					)
          self.assertTrue(torch.allclose(outputs.logits[0, :3, :3, :3]	,    UpperCamelCase__	,    atol=1e-4					)					)






      @slow
      def 			UpperCAmelCase_       (		self:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	str					=     SegformerImageProcessor(
              image_scale=(512, 512)	,    keep_ratio=UpperCamelCase__	,    align=UpperCamelCase__	,    do_random_crop=UpperCamelCase__					)
          UpperCamelCase__:	str					=     SegformerForSemanticSegmentation.from_pretrained(
              "nvidia/segformer-b1-finetuned-cityscapes-1024-1024"					).to(UpperCamelCase__					)

          UpperCamelCase__:	Optional[int]					=     prepare_img()
          UpperCamelCase__:	Optional[Any]					=     image_processor(images=UpperCamelCase__	,    return_tensors="pt"					)
          UpperCamelCase__:	Any					=     encoded_inputs.pixel_values.to(UpperCamelCase__					)

          with torch.no_grad():
              UpperCamelCase__:	List[Any]					=     model(UpperCamelCase__					)

          UpperCamelCase__:	Tuple					=     torch.Size((1, model.config.num_labels, 128, 128)					)
          self.assertEqual(outputs.logits.shape	,    UpperCamelCase__					)

          UpperCamelCase__:	Any					=     torch.tensor(
              [
                  [[-13.5_748, -13.9_111, -12.6_500], [-14.3_500, -15.3_683, -14.2_328], [-14.7_532, -16.0_424, -15.6_087]],
                  [[-17.1_651, -15.8_725, -12.9_653], [-17.2_580, -17.3_718, -14.8_223], [-16.6_058, -16.8_783, -16.7_452]],
                  [[-3.6_456, -3.0_209, -1.4_203], [-3.0_797, -3.1_959, -2.0_000], [-1.8_757, -1.9_217, -1.6_997]],
              ]					).to(UpperCamelCase__					)
          self.assertTrue(torch.allclose(outputs.logits[0, :3, :3, :3]	,    UpperCamelCase__	,    atol=1e-1					)					)






      @slow
      def 			UpperCAmelCase_       (		self:			Optional[Any]					):
          '''simple docstring'''


          UpperCamelCase__:	Any					=     SegformerImageProcessor(
              image_scale=(512, 512)	,    keep_ratio=UpperCamelCase__	,    align=UpperCamelCase__	,    do_random_crop=UpperCamelCase__					)
          UpperCamelCase__:	Optional[Any]					=     SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512"					).to(
              UpperCamelCase__					)

          UpperCamelCase__:	Any					=     prepare_img()
          UpperCamelCase__:	List[Any]					=     image_processor(images=UpperCamelCase__	,    return_tensors="pt"					)
          UpperCamelCase__:	Optional[int]					=     encoded_inputs.pixel_values.to(UpperCamelCase__					)

          with torch.no_grad():
              UpperCamelCase__:	Optional[int]					=     model(UpperCamelCase__					)

          UpperCamelCase__:	Dict					=     outputs.logits.detach().cpu()

          UpperCamelCase__:	str					=     image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__	,    target_sizes=[(500, 300)]					)
          UpperCamelCase__:	Tuple					=     torch.Size((500, 300)					)
          self.assertEqual(segmentation[0].shape	,    UpperCamelCase__					)

          UpperCamelCase__:	Tuple					=     image_processor.post_process_semantic_segmentation(outputs=UpperCamelCase__					)
          UpperCamelCase__:	Tuple					=     torch.Size((128, 128)					)
          self.assertEqual(segmentation[0].shape	,    UpperCamelCase__					)




'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tensorflow_text_available, is_torch_available


__lowerCamelCase									=     {
    '''configuration_ernie''': ['''ERNIE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ErnieConfig''', '''ErnieOnnxConfig'''],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __lowerCamelCase									=     [
          '''ERNIE_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''ErnieForCausalLM''',
          '''ErnieForMaskedLM''',
          '''ErnieForMultipleChoice''',
          '''ErnieForNextSentencePrediction''',
          '''ErnieForPreTraining''',
          '''ErnieForQuestionAnswering''',
          '''ErnieForSequenceClassification''',
          '''ErnieForTokenClassification''',
          '''ErnieModel''',
          '''ErniePreTrainedModel''',
      ]

if TYPE_CHECKING:
      from .configuration_ernie import ERNIE_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieConfig, ErnieOnnxConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_ernie import (
                ERNIE_PRETRAINED_MODEL_ARCHIVE_LIST,
                ErnieForCausalLM,
                ErnieForMaskedLM,
                ErnieForMultipleChoice,
                ErnieForNextSentencePrediction,
                ErnieForPreTraining,
                ErnieForQuestionAnswering,
                ErnieForSequenceClassification,
                ErnieForTokenClassification,
                ErnieModel,
                ErniePreTrainedModel,
            )

else:
      import sys

      __lowerCamelCase									=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
