





import collections
import inspect
import unittest

from transformers import FocalNetConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

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


if is_torch_available():
   import torch
   from torch import nn

   from transformers import (
       FocalNetBackbone,
       FocalNetForImageClassification,
       FocalNetForMaskedImageModeling,
       FocalNetModel,
   )
   from transformers.models.focalnet.modeling_focalnet import FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
   from PIL import Image

   from transformers import AutoImageProcessor




class        _a    :

      """simple docstring"""


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


          UpperCamelCase__:	Optional[Any]					=     parent
          UpperCamelCase__:	Optional[Any]					=     batch_size
          UpperCamelCase__:	List[str]					=     image_size
          UpperCamelCase__:	List[Any]					=     patch_size
          UpperCamelCase__:	int					=     num_channels
          UpperCamelCase__:	int					=     embed_dim
          UpperCamelCase__:	Optional[int]					=     hidden_sizes
          UpperCamelCase__:	Optional[int]					=     depths
          UpperCamelCase__:	str					=     num_heads
          UpperCamelCase__:	Tuple					=     window_size
          UpperCamelCase__:	int					=     mlp_ratio
          UpperCamelCase__:	Optional[Any]					=     qkv_bias
          UpperCamelCase__:	Union[str, Any]					=     hidden_dropout_prob
          UpperCamelCase__:	Optional[int]					=     attention_probs_dropout_prob
          UpperCamelCase__:	Tuple					=     drop_path_rate
          UpperCamelCase__:	Dict					=     hidden_act
          UpperCamelCase__:	Tuple					=     use_absolute_embeddings
          UpperCamelCase__:	List[Any]					=     patch_norm
          UpperCamelCase__:	List[str]					=     layer_norm_eps
          UpperCamelCase__:	int					=     initializer_range
          UpperCamelCase__:	Any					=     is_training
          UpperCamelCase__:	Union[str, Any]					=     scope
          UpperCamelCase__:	str					=     use_labels
          UpperCamelCase__:	List[Any]					=     type_sequence_label_size
          UpperCamelCase__:	int					=     encoder_stride
          UpperCamelCase__:	str					=     out_features
          UpperCamelCase__:	int					=     out_indices






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


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

          UpperCamelCase__:	Optional[Any]					=     None
          if self.use_labels:
              UpperCamelCase__:	Dict					=     ids_tensor([self.batch_size]	,    self.type_sequence_label_size					)

          UpperCamelCase__:	List[Any]					=     self.get_config()

          return config, pixel_values, labels






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


          return FocalNetConfig(
              image_size=self.image_size	,    patch_size=self.patch_size	,    num_channels=self.num_channels	,    embed_dim=self.embed_dim	,    hidden_sizes=self.hidden_sizes	,    depths=self.depths	,    num_heads=self.num_heads	,    window_size=self.window_size	,    mlp_ratio=self.mlp_ratio	,    qkv_bias=self.qkv_bias	,    hidden_dropout_prob=self.hidden_dropout_prob	,    attention_probs_dropout_prob=self.attention_probs_dropout_prob	,    drop_path_rate=self.drop_path_rate	,    hidden_act=self.hidden_act	,    use_absolute_embeddings=self.use_absolute_embeddings	,    path_norm=self.patch_norm	,    layer_norm_eps=self.layer_norm_eps	,    initializer_range=self.initializer_range	,    encoder_stride=self.encoder_stride	,    out_features=self.out_features	,    out_indices=self.out_indices	,    )






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


          UpperCamelCase__:	Tuple					=     FocalNetModel(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	Any					=     model(UpperCamelCase__					)

          UpperCamelCase__:	int					=     ((config.image_size // config.patch_size) ** 2) // (4 ** (len(config.depths					) - 1))
          UpperCamelCase__:	Tuple					=     int(config.embed_dim * 2 ** (len(config.depths					) - 1)					)

          self.parent.assertEqual(result.last_hidden_state.shape	,    (self.batch_size, expected_seq_len, expected_dim)					)






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


          UpperCamelCase__:	str					=     FocalNetBackbone(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	List[str]					=     model(UpperCamelCase__					)

          # verify feature maps
          self.parent.assertEqual(len(result.feature_maps					)	,    len(config.out_features					)					)
          self.parent.assertListEqual(list(result.feature_maps[0].shape					)	,    [self.batch_size, self.image_size, 8, 8]					)

          # verify channels
          self.parent.assertEqual(len(model.channels					)	,    len(config.out_features					)					)
          self.parent.assertListEqual(model.channels	,    config.hidden_sizes[:-1]					)

          # verify backbone works with out_features=None
          UpperCamelCase__:	Any					=     None
          UpperCamelCase__:	Any					=     FocalNetBackbone(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	str					=     model(UpperCamelCase__					)

          # verify feature maps
          self.parent.assertEqual(len(result.feature_maps					)	,    1					)
          self.parent.assertListEqual(list(result.feature_maps[0].shape					)	,    [self.batch_size, self.image_size * 2, 4, 4]					)

          # verify channels
          self.parent.assertEqual(len(model.channels					)	,    1					)
          self.parent.assertListEqual(model.channels	,    [config.hidden_sizes[-1]]					)






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


          UpperCamelCase__:	List[Any]					=     FocalNetForMaskedImageModeling(config=UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	Optional[int]					=     model(UpperCamelCase__					)
          self.parent.assertEqual(
              result.reconstruction.shape	,    (self.batch_size, self.num_channels, self.image_size, self.image_size)					)

          # test greyscale images
          UpperCamelCase__:	List[str]					=     1
          UpperCamelCase__:	Union[str, Any]					=     FocalNetForMaskedImageModeling(UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()

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






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


          UpperCamelCase__:	Any					=     self.type_sequence_label_size
          UpperCamelCase__:	Dict					=     FocalNetForImageClassification(UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()
          UpperCamelCase__:	Any					=     model(UpperCamelCase__	,    labels=UpperCamelCase__					)
          self.parent.assertEqual(result.logits.shape	,    (self.batch_size, self.type_sequence_label_size)					)

          # test greyscale images
          UpperCamelCase__:	int					=     1
          UpperCamelCase__:	List[Any]					=     FocalNetForImageClassification(UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()

          UpperCamelCase__:	Union[str, Any]					=     floats_tensor([self.batch_size, 1, self.image_size, self.image_size]					)
          UpperCamelCase__:	int					=     model(UpperCamelCase__					)
          self.parent.assertEqual(result.logits.shape	,    (self.batch_size, self.type_sequence_label_size)					)






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


          UpperCamelCase__:	List[str]					=     self.prepare_config_and_inputs()

          UpperCamelCase__				, UpperCamelCase__				, UpperCamelCase__:	Optional[int]					=     config_and_inputs
          UpperCamelCase__:	Any					=     {"pixel_values": pixel_values}
          return config, inputs_dict




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

      """simple docstring"""


      UpperCamelCase__  		=       (
          (
              FocalNetModel,
              FocalNetForImageClassification,
              FocalNetForMaskedImageModeling,
              FocalNetBackbone,
          )
          if is_torch_available()
          else ()
      )
      UpperCamelCase__  		=       (
          {"""feature-extraction""": FocalNetModel, """image-classification""": FocalNetForImageClassification}
          if is_torch_available()
          else {}
      )
      UpperCamelCase__  		=       False

      UpperCamelCase__  		=       False
      UpperCamelCase__  		=       False
      UpperCamelCase__  		=       False
      UpperCamelCase__  		=       False






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


          UpperCamelCase__:	str					=     FocalNetModelTester(self					)
          UpperCamelCase__:	str					=     ConfigTester(self	,    config_class=UpperCamelCase__	,    embed_dim=37	,    has_text_modality=UpperCamelCase__					)






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


          self.create_and_test_config_common_properties()
          self.config_tester.create_and_test_config_to_json_string()
          self.config_tester.create_and_test_config_to_json_file()
          self.config_tester.create_and_test_config_from_and_save_pretrained()
          self.config_tester.create_and_test_config_with_num_labels()
          self.config_tester.check_config_can_be_init_without_params()
          self.config_tester.check_config_arguments_init()






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


          return






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


          UpperCamelCase__:	Union[str, Any]					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*UpperCamelCase__					)






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


          UpperCamelCase__:	List[Any]					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_backbone(*UpperCamelCase__					)






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


          UpperCamelCase__:	int					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_masked_image_modeling(*UpperCamelCase__					)






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


          UpperCamelCase__:	List[str]					=     self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_for_image_classification(*UpperCamelCase__					)






      @unittest.skip(reason="FocalNet does not use inputs_embeds"					)
      def 			UpperCAmelCase_       (		self:			Optional[int]					):
          '''simple docstring'''


          pass






      @unittest.skip(reason="FocalNet does not use feedforward chunking"					)
      def 			UpperCAmelCase_       (		self:			Any					):
          '''simple docstring'''


          pass






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


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

          for model_class in self.all_model_classes[:-1]:
              UpperCamelCase__:	List[str]					=     model_class(UpperCamelCase__					)
              self.assertIsInstance(model.get_input_embeddings()	,    (nn.Module)					)
              UpperCamelCase__:	Dict					=     model.get_output_embeddings()
              self.assertTrue(x is None or isinstance(UpperCamelCase__	,    nn.Linear					)					)






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


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

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

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






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


          UpperCamelCase__:	Tuple					=     model_class(UpperCamelCase__					)
          model.to(UpperCamelCase__					)
          model.eval()

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

          UpperCamelCase__:	List[str]					=     outputs.hidden_states

          UpperCamelCase__:	Optional[int]					=     getattr(
              self.model_tester	,    "expected_num_hidden_layers"	,    len(self.model_tester.depths					) + 1					)
          self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)

          # FocalNet has a different seq_length
          UpperCamelCase__:	Dict					=     (
              config.patch_size
              if isinstance(config.patch_size	,    collections.abc.Iterable					)
              else (config.patch_size, config.patch_size)
          )

          UpperCamelCase__:	Optional[int]					=     (image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])

          self.assertListEqual(
              list(hidden_states[0].shape[-2:]					)	,    [num_patches, self.model_tester.embed_dim]	,    )

          UpperCamelCase__:	List[Any]					=     outputs.reshaped_hidden_states
          self.assertEqual(len(UpperCamelCase__					)	,    UpperCamelCase__					)

          UpperCamelCase__				, UpperCamelCase__				, UpperCamelCase__				, UpperCamelCase__:	List[str]					=     reshaped_hidden_states[0].shape
          UpperCamelCase__:	List[str]					=     (
              reshaped_hidden_states[0].view(UpperCamelCase__	,    UpperCamelCase__	,    height * width					).permute(0	,    2	,    1					)
          )
          self.assertListEqual(
              list(reshaped_hidden_states.shape[-2:]					)	,    [num_patches, self.model_tester.embed_dim]	,    )






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


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

          UpperCamelCase__:	Tuple					=     (
              self.model_tester.image_size
              if isinstance(self.model_tester.image_size	,    collections.abc.Iterable					)
              else (self.model_tester.image_size, self.model_tester.image_size)
          )

          for model_class in self.all_model_classes[:-1]:
              UpperCamelCase__:	int					=     True
              self.check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__					)

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

              self.check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__					)






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


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

          UpperCamelCase__:	List[Any]					=     (
              self.model_tester.image_size
              if isinstance(self.model_tester.image_size	,    collections.abc.Iterable					)
              else (self.model_tester.image_size, self.model_tester.image_size)
          )
          UpperCamelCase__:	Dict					=     (
              config.patch_size
              if isinstance(config.patch_size	,    collections.abc.Iterable					)
              else (config.patch_size, config.patch_size)
          )

          UpperCamelCase__:	List[str]					=     image_size[0] + patch_size[0] - (image_size[0] % patch_size[0])
          UpperCamelCase__:	str					=     image_size[1] + patch_size[1] - (image_size[1] % patch_size[1])

          for model_class in self.all_model_classes[:-1]:
              UpperCamelCase__:	Union[str, Any]					=     True
              self.check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__	,    (padded_height, padded_width)					)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              UpperCamelCase__:	Optional[Any]					=     True
              self.check_hidden_states_output(UpperCamelCase__	,    UpperCamelCase__	,    UpperCamelCase__	,    (padded_height, padded_width)					)






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


          for model_name in FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              UpperCamelCase__:	Dict					=     FocalNetModel.from_pretrained(UpperCamelCase__					)
              self.assertIsNotNone(UpperCamelCase__					)






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


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

          UpperCamelCase__:	Optional[int]					=     _config_zero_init(UpperCamelCase__					)
          for model_class in self.all_model_classes:
              UpperCamelCase__:	str					=     model_class(config=UpperCamelCase__					)
              for name, param in model.named_parameters():
                  if "embeddings" not in name and param.requires_grad:
                      self.assertIn(
                          ((param.data.mean() * 1e9).round() / 1e9).item()	,    [0.0, 1.0]	,    msg=F"Parameter {name} of model {model_class} seems not properly initialized"	,    )




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

      """simple docstring"""


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


          return AutoImageProcessor.from_pretrained("microsoft/focalnet-tiny"					) if is_vision_available() else None






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


          UpperCamelCase__:	Optional[Any]					=     FocalNetForImageClassification.from_pretrained("microsoft/focalnet-tiny"					).to(UpperCamelCase__					)
          UpperCamelCase__:	List[str]					=     self.default_image_processor

          UpperCamelCase__:	int					=     Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"					)
          UpperCamelCase__:	Optional[Any]					=     image_processor(images=UpperCamelCase__	,    return_tensors="pt"					).to(UpperCamelCase__					)

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

          # verify the logits
          UpperCamelCase__:	Dict					=     torch.Size((1, 1000)					)
          self.assertEqual(outputs.logits.shape	,    UpperCamelCase__					)
          UpperCamelCase__:	Dict					=     torch.tensor([0.2_166, -0.4_368, 0.2_191]					).to(UpperCamelCase__					)
          self.assertTrue(torch.allclose(outputs.logits[0, :3]	,    UpperCamelCase__	,    atol=1e-4					)					)
          self.assertTrue(outputs.logits.argmax(dim=-1					).item()	,    281					)




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

      """simple docstring"""


      UpperCamelCase__  		=       (FocalNetBackbone,) if is_torch_available() else ()
      UpperCamelCase__  		=       FocalNetConfig

      UpperCamelCase__  		=       False






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


          UpperCamelCase__:	List[str]					=     FocalNetModelTester(self					)




'''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__)
