'''simple docstring'''




import inspect
import unittest

import numpy as np

from tests.test_modeling_common import floats_tensor
from transformers import MaskaFormerConfig, is_torch_available, is_vision_available
from transformers.testing_utils import require_torch, require_torch_multi_gpu, require_vision, slow, torch_device
from transformers.utils import cached_property

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
   import torch

   from transformers import MaskaFormerForUniversalSegmentation, MaskaFormerModel

   if is_vision_available():
      from transformers import MaskaFormerImageProcessor

if is_vision_available():
   from PIL import Image






class 		__A       :






       def __init__(      self				,     UpperCamelCase_				,     UpperCamelCase_=2				,     UpperCamelCase_=True				,     UpperCamelCase_=False				,     UpperCamelCase_=10				,     UpperCamelCase_=3				,     UpperCamelCase_=32 * 8				,     UpperCamelCase_=32 * 8				,     UpperCamelCase_=4				,     UpperCamelCase_=64				,     ):
              __UpperCAmelCase  :				Optional[Any]       				=		parent
              __UpperCAmelCase  :				int       				=		batch_size
              __UpperCAmelCase  :				str       				=		is_training
              __UpperCAmelCase  :				Tuple       				=		use_auxiliary_loss
              __UpperCAmelCase  :				Optional[int]       				=		num_queries
              __UpperCAmelCase  :				Tuple       				=		num_channels
              __UpperCAmelCase  :				Optional[Any]       				=		min_size
              __UpperCAmelCase  :				Dict       				=		max_size
              __UpperCAmelCase  :				Any       				=		num_labels
              __UpperCAmelCase  :				List[Any]       				=		hidden_dim
              __UpperCAmelCase  :				str       				=		hidden_dim






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				int       				=		floats_tensor([self.batch_size, self.num_channels, self.min_size, self.max_size]      ).to(
                  UpperCamelCase_      )

              __UpperCAmelCase  :				int       				=		torch.ones([self.batch_size, self.min_size, self.max_size]				,     device=UpperCamelCase_      )

              __UpperCAmelCase  :				int       				=		(
                  torch.rand([self.batch_size, self.num_labels, self.min_size, self.max_size]				,     device=UpperCamelCase_      ) > 0.5
              ).float()
              __UpperCAmelCase  :				Tuple       				=		(torch.rand((self.batch_size, self.num_labels)				,     device=UpperCamelCase_      ) > 0.5).long()

              __UpperCAmelCase  :				Optional[int]       				=		self.get_config()
              return config, pixel_values, pixel_mask, mask_labels, class_labels






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Optional[int]       				=		MaskaFormerConfig(
                  hidden_size=self.hidden_dim				,     )
              __UpperCAmelCase  :				Union[str, Any]       				=		self.num_queries
              __UpperCAmelCase  :				List[str]       				=		self.num_labels

              __UpperCAmelCase  :				int       				=		[1, 1, 1, 1]
              __UpperCAmelCase  :				Tuple       				=		self.num_channels

              __UpperCAmelCase  :				Union[str, Any]       				=		64
              __UpperCAmelCase  :				List[str]       				=		1_28
              __UpperCAmelCase  :				Tuple       				=		self.hidden_dim
              __UpperCAmelCase  :				List[Any]       				=		self.hidden_dim
              __UpperCAmelCase  :				Dict       				=		self.hidden_dim
              return config






       def 			_snake_case						(      self      ):
              __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase  :				Union[str, Any]       				=		self.prepare_config_and_inputs()
              __UpperCAmelCase  :				List[Any]       				=		{"pixel_values": pixel_values, "pixel_mask": pixel_mask}
              return config, inputs_dict






       def 			_snake_case						(      self				,     UpperCamelCase_				,     UpperCamelCase_      ):
              __UpperCAmelCase  :				List[Any]       				=		output.encoder_hidden_states
              __UpperCAmelCase  :				List[str]       				=		output.pixel_decoder_hidden_states
              __UpperCAmelCase  :				Optional[int]       				=		output.transformer_decoder_hidden_states

              self.parent.assertTrue(len(UpperCamelCase_      )				,     len(config.backbone_config.depths      )      )
              self.parent.assertTrue(len(UpperCamelCase_      )				,     len(config.backbone_config.depths      )      )
              self.parent.assertTrue(len(UpperCamelCase_      )				,     config.decoder_layers      )






       def 			_snake_case						(      self				,     UpperCamelCase_				,     UpperCamelCase_				,     UpperCamelCase_				,     UpperCamelCase_=False      ):
              with torch.no_grad():
                     __UpperCAmelCase  :				Any       				=		MaskaFormerModel(config=UpperCamelCase_      )
                     model.to(UpperCamelCase_      )
                     model.eval()

                     __UpperCAmelCase  :				Any       				=		model(pixel_values=UpperCamelCase_				,     pixel_mask=UpperCamelCase_      )
                     __UpperCAmelCase  :				Union[str, Any]       				=		model(UpperCamelCase_				,     output_hidden_states=UpperCamelCase_      )

              self.parent.assertEqual(
                  output.transformer_decoder_last_hidden_state.shape				,     (self.batch_size, self.num_queries, self.hidden_dim)				,     )
              # let's ensure the other two hidden state exists
              self.parent.assertTrue(output.pixel_decoder_last_hidden_state is not None      )
              self.parent.assertTrue(output.encoder_last_hidden_state is not None      )

              if output_hidden_states:
                     self.check_output_hidden_state(UpperCamelCase_				,     UpperCamelCase_      )







       def 			_snake_case						(      self				,     UpperCamelCase_				,     UpperCamelCase_				,     UpperCamelCase_				,     UpperCamelCase_				,     UpperCamelCase_      ):
              __UpperCAmelCase  :				Tuple       				=		MaskaFormerForUniversalSegmentation(config=UpperCamelCase_      )
              model.to(UpperCamelCase_      )
              model.eval()

              def comm_check_on_output(UpperCamelCase_      ):
                     # let's still check that all the required stuff is there
                     self.parent.assertTrue(result.transformer_decoder_last_hidden_state is not None      )
                     self.parent.assertTrue(result.pixel_decoder_last_hidden_state is not None      )
                     self.parent.assertTrue(result.encoder_last_hidden_state is not None      )
                     # okay, now we need to check the logits shape
                     # due to the encoder compression, masks have a //4 spatial size
                     self.parent.assertEqual(
                         result.masks_queries_logits.shape				,     (self.batch_size, self.num_queries, self.min_size // 4, self.max_size // 4)				,     )
                     # + 1 for null class
                     self.parent.assertEqual(
                         result.class_queries_logits.shape				,     (self.batch_size, self.num_queries, self.num_labels + 1)      )

              with torch.no_grad():
                     __UpperCAmelCase  :				List[str]       				=		model(pixel_values=UpperCamelCase_				,     pixel_mask=UpperCamelCase_      )
                     __UpperCAmelCase  :				Optional[int]       				=		model(UpperCamelCase_      )

                     comm_check_on_output(UpperCamelCase_      )

                     __UpperCAmelCase  :				Dict       				=		model(
                         pixel_values=UpperCamelCase_				,     pixel_mask=UpperCamelCase_				,     mask_labels=UpperCamelCase_				,     class_labels=UpperCamelCase_      )

              comm_check_on_output(UpperCamelCase_      )

              self.parent.assertTrue(result.loss is not None      )
              self.parent.assertEqual(result.loss.shape				,     torch.Size([1]      )      )






@require_torch
class 		__A       (__magic_name__ ,					__magic_name__ ,					unittest.TestCase   ):
       snake_case       :List[Any]				    =					(MaskaFormerModel, MaskaFormerForUniversalSegmentation) if is_torch_available() else ()
       snake_case       :Tuple				    =					{"feature-extraction": MaskaFormerModel} if is_torch_available() else {}

       snake_case       :List[str]				    =					False
       snake_case       :Optional[int]				    =					False
       snake_case       :Tuple				    =					False
       snake_case       :Optional[Any]				    =					False






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				int       				=		MaskaFormerModelTester(self      )
              __UpperCAmelCase  :				Optional[Any]       				=		ConfigTester(self				,     config_class=UpperCamelCase_				,     has_text_modality=UpperCamelCase_      )






       def 			_snake_case						(      self      ):
              self.config_tester.run_common_tests()






       def 			_snake_case						(      self      ):
              __UpperCAmelCase				, __UpperCAmelCase  :				List[Any]       				=		self.model_tester.prepare_config_and_inputs_for_common()
              self.model_tester.create_and_check_maskaformer_model(UpperCamelCase_				,     **UpperCamelCase_				,     output_hidden_states=UpperCamelCase_      )






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Optional[int]       				=		self.model_tester.prepare_config_and_inputs()
              self.model_tester.create_and_check_maskaformer_instance_segmentation_head_model(*UpperCamelCase_      )






       @unittest.skip(reason="Mask2Former does not use inputs_embeds"      )
       def 			_snake_case						(      self      ):
              pass






       @unittest.skip(reason="Mask2Former does not have a get_input_embeddings method"      )
       def 			_snake_case						(      self      ):
              pass






       @unittest.skip(reason="Mask2Former is not a generative model"      )
       def 			_snake_case						(      self      ):
              pass






       @unittest.skip(reason="Mask2Former does not use token embeddings"      )
       def 			_snake_case						(      self      ):
              pass






       @require_torch_multi_gpu
       @unittest.skip(
           reason="Mask2Former has some layers using `add_module` which doesn't work well with `nn.DataParallel`"      )
       def 			_snake_case						(      self      ):
              pass






       @unittest.skip("Will be fixed soon by reducing the size of the model used for common tests."      )
       def 			_snake_case						(      self      ):
              pass






       def 			_snake_case						(      self      ):
              __UpperCAmelCase				, __UpperCAmelCase  :				List[str]       				=		self.model_tester.prepare_config_and_inputs_for_common()

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

                     __UpperCAmelCase  :				Optional[int]       				=		["pixel_values"]
                     self.assertListEqual(arg_names[:1]				,     UpperCamelCase_      )






       @slow
       def 			_snake_case						(      self      ):
              for model_name in ["facebook/mask2former-swin-small-coco-instance"]:
                     __UpperCAmelCase  :				Dict       				=		MaskaFormerModel.from_pretrained(UpperCamelCase_      )
                     self.assertIsNotNone(UpperCamelCase_      )






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Any       				=		(self.model_tester.min_size,) * 2
              __UpperCAmelCase  :				str       				=		{
                  "pixel_values": torch.randn((2, 3, *size)				,     device=UpperCamelCase_      ),
                  "mask_labels": torch.randn((2, 10, *size)				,     device=UpperCamelCase_      ),
                  "class_labels": torch.zeros(2				,     10				,     device=UpperCamelCase_      ).long(),
              }
              __UpperCAmelCase  :				int       				=		self.model_tester.get_config()

              __UpperCAmelCase  :				str       				=		MaskaFormerForUniversalSegmentation(UpperCamelCase_      ).to(UpperCamelCase_      )
              __UpperCAmelCase  :				int       				=		model(**UpperCamelCase_      )
              self.assertTrue(outputs.loss is not None      )






       def 			_snake_case						(      self      ):
              __UpperCAmelCase				, __UpperCAmelCase  :				List[str]       				=		self.model_tester.prepare_config_and_inputs_for_common()
              self.model_tester.create_and_check_maskaformer_model(UpperCamelCase_				,     **UpperCamelCase_				,     output_hidden_states=UpperCamelCase_      )






       def 			_snake_case						(      self      ):
              __UpperCAmelCase				, __UpperCAmelCase  :				Dict       				=		self.model_tester.prepare_config_and_inputs_for_common()

              for model_class in self.all_model_classes:
                     __UpperCAmelCase  :				int       				=		model_class(UpperCamelCase_      ).to(UpperCamelCase_      )
                     __UpperCAmelCase  :				Union[str, Any]       				=		model(**UpperCamelCase_				,     output_attentions=UpperCamelCase_      )
                     self.assertTrue(outputs.attentions is not None      )






       def 			_snake_case						(      self      ):
              if not self.model_tester.is_training:
                     return

              __UpperCAmelCase  :				Any       				=		self.all_model_classes[1]
              __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase  :				List[Any]       				=		self.model_tester.prepare_config_and_inputs()

              __UpperCAmelCase  :				Optional[int]       				=		model_class(UpperCamelCase_      )
              model.to(UpperCamelCase_      )
              model.train()

              __UpperCAmelCase  :				Optional[int]       				=		model(UpperCamelCase_				,     mask_labels=UpperCamelCase_				,     class_labels=UpperCamelCase_      ).loss
              loss.backward()







       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Tuple       				=		self.all_model_classes[1]
              __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase				, __UpperCAmelCase  :				Dict       				=		self.model_tester.prepare_config_and_inputs()
              __UpperCAmelCase  :				int       				=		True
              __UpperCAmelCase  :				Tuple       				=		True

              __UpperCAmelCase  :				Optional[Any]       				=		model_class(UpperCamelCase_      ).to(UpperCamelCase_      )
              model.train()

              __UpperCAmelCase  :				Dict       				=		model(UpperCamelCase_				,     mask_labels=UpperCamelCase_				,     class_labels=UpperCamelCase_      )

              __UpperCAmelCase  :				Optional[Any]       				=		outputs.encoder_hidden_states[0]
              encoder_hidden_states.retain_grad()

              __UpperCAmelCase  :				str       				=		outputs.pixel_decoder_hidden_states[0]
              pixel_decoder_hidden_states.retain_grad()

              __UpperCAmelCase  :				Dict       				=		outputs.transformer_decoder_hidden_states[0]
              transformer_decoder_hidden_states.retain_grad()

              __UpperCAmelCase  :				Union[str, Any]       				=		outputs.attentions[0]
              attentions.retain_grad()

              outputs.loss.backward(retain_graph=UpperCamelCase_      )

              self.assertIsNotNone(encoder_hidden_states.grad      )
              self.assertIsNotNone(pixel_decoder_hidden_states.grad      )
              self.assertIsNotNone(transformer_decoder_hidden_states.grad      )
              self.assertIsNotNone(attentions.grad      )





_a   :	Tuple 							=   1e-4

def _lowercase	(      )					->       List[str]:





       """simple docstring"""


       __UpperCAmelCase  :				Tuple       				=		Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"						)
       return image






@require_vision
@slow
class 		__A       (unittest.TestCase   ):






       @cached_property
       def 			_snake_case						(      self      ):
              return "facebook/mask2former-swin-small-coco-instance"






       @cached_property
       def 			_snake_case						(      self      ):
              return MaskaFormerImageProcessor.from_pretrained(self.model_checkpoints      ) if is_vision_available() else None






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				int       				=		MaskaFormerModel.from_pretrained(self.model_checkpoints      ).to(UpperCamelCase_      )
              __UpperCAmelCase  :				Tuple       				=		self.default_image_processor
              __UpperCAmelCase  :				List[Any]       				=		prepare_img()
              __UpperCAmelCase  :				Tuple       				=		image_processor(UpperCamelCase_				,     return_tensors="pt"      ).to(UpperCamelCase_      )
              __UpperCAmelCase  :				Union[str, Any]       				=		inputs["pixel_values"].shape
              # check size is divisible by 32
              self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0      )
              # check size
              self.assertEqual(UpperCamelCase_				,     (1, 3, 3_84, 3_84)      )

              with torch.no_grad():
                     __UpperCAmelCase  :				Optional[int]       				=		model(**UpperCamelCase_      )

              __UpperCAmelCase  :				Optional[int]       				=		torch.tensor(
                  [[-0.2_7_9_0, -1.0_7_1_7, -1.1_6_6_8], [-0.5_1_2_8, -0.3_1_2_8, -0.4_9_8_7], [-0.5_8_3_2, 0.1_9_7_1, -0.0_1_9_7]]      ).to(UpperCamelCase_      )
              self.assertTrue(
                  torch.allclose(
                      outputs.encoder_last_hidden_state[0, 0, :3, :3]				,     UpperCamelCase_				,     atol=UpperCamelCase_      )      )

              __UpperCAmelCase  :				Any       				=		torch.tensor(
                  [[0.8_9_7_3, 1.1_8_4_7, 1.1_7_7_6], [1.1_9_3_4, 1.5_0_4_0, 1.5_1_2_8], [1.1_1_5_3, 1.4_4_8_6, 1.4_9_5_1]]      ).to(UpperCamelCase_      )
              self.assertTrue(
                  torch.allclose(
                      outputs.pixel_decoder_last_hidden_state[0, 0, :3, :3]				,     UpperCamelCase_				,     atol=UpperCamelCase_      )      )

              __UpperCAmelCase  :				Dict       				=		torch.tensor(
                  [[2.1_1_5_2, 1.7_0_0_0, -0.8_6_0_3], [1.5_8_0_8, 1.8_0_0_4, -0.9_3_5_3], [1.6_0_4_3, 1.7_4_9_5, -0.5_9_9_9]]      ).to(UpperCamelCase_      )
              self.assertTrue(
                  torch.allclose(
                      outputs.transformer_decoder_last_hidden_state[0, :3, :3]				,     UpperCamelCase_				,     atol=UpperCamelCase_      )      )






       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Dict       				=		MaskaFormerForUniversalSegmentation.from_pretrained(self.model_checkpoints      ).to(UpperCamelCase_      ).eval()
              __UpperCAmelCase  :				Dict       				=		self.default_image_processor
              __UpperCAmelCase  :				List[str]       				=		prepare_img()
              __UpperCAmelCase  :				Union[str, Any]       				=		image_processor(UpperCamelCase_				,     return_tensors="pt"      ).to(UpperCamelCase_      )
              __UpperCAmelCase  :				Any       				=		inputs["pixel_values"].shape
              # check size is divisible by 32
              self.assertTrue((inputs_shape[-1] % 32) == 0 and (inputs_shape[-2] % 32) == 0      )
              # check size
              self.assertEqual(UpperCamelCase_				,     (1, 3, 3_84, 3_84)      )

              with torch.no_grad():
                     __UpperCAmelCase  :				List[Any]       				=		model(**UpperCamelCase_      )
              # masks_queries_logits
              __UpperCAmelCase  :				Tuple       				=		outputs.masks_queries_logits
              self.assertEqual(
                  masks_queries_logits.shape				,     (1, model.config.num_queries, inputs_shape[-2] // 4, inputs_shape[-1] // 4)      )
              __UpperCAmelCase  :				Dict       				=		[
                  [-8.7_8_3_9, -9.0_0_5_6, -8.8_1_2_1],
                  [-7.4_1_0_4, -7.0_3_1_3, -6.5_4_0_1],
                  [-6.6_1_0_5, -6.3_4_2_7, -6.4_6_7_5],
              ]
              __UpperCAmelCase  :				Optional[int]       				=		torch.tensor(UpperCamelCase_      ).to(UpperCamelCase_      )
              self.assertTrue(torch.allclose(masks_queries_logits[0, 0, :3, :3]				,     UpperCamelCase_				,     atol=UpperCamelCase_      )      )
              # class_queries_logits
              __UpperCAmelCase  :				Any       				=		outputs.class_queries_logits
              self.assertEqual(class_queries_logits.shape				,     (1, model.config.num_queries, model.config.num_labels + 1)      )
              __UpperCAmelCase  :				Union[str, Any]       				=		torch.tensor(
                  [
                      [1.8_3_2_4, -8.0_8_3_5, -4.1_9_2_2],
                      [0.8_4_5_0, -9.0_0_5_0, -3.6_0_5_3],
                      [0.3_0_4_5, -7.7_2_9_3, -3.0_2_7_5],
                  ]      ).to(UpperCamelCase_      )
              self.assertTrue(torch.allclose(outputs.class_queries_logits[0, :3, :3]				,     UpperCamelCase_				,     atol=UpperCamelCase_      )      )







       def 			_snake_case						(      self      ):
              __UpperCAmelCase  :				Union[str, Any]       				=		MaskaFormerForUniversalSegmentation.from_pretrained(self.model_checkpoints      ).to(UpperCamelCase_      ).eval()
              __UpperCAmelCase  :				Optional[Any]       				=		self.default_image_processor

              __UpperCAmelCase  :				Optional[int]       				=		image_processor(
                  [np.zeros((3, 8_00, 13_33)      ), np.zeros((3, 8_00, 13_33)      )]				,     segmentation_maps=[np.zeros((3_84, 3_84)      ).astype(np.floataa      ), np.zeros((3_84, 3_84)      ).astype(np.floataa      )]				,     return_tensors="pt"				,     )

              __UpperCAmelCase  :				Any       				=		inputs["pixel_values"].to(UpperCamelCase_      )
              __UpperCAmelCase  :				int       				=		[el.to(UpperCamelCase_      ) for el in inputs["mask_labels"]]
              __UpperCAmelCase  :				int       				=		[el.to(UpperCamelCase_      ) for el in inputs["class_labels"]]

              with torch.no_grad():
                     __UpperCAmelCase  :				List[str]       				=		model(**UpperCamelCase_      )

              self.assertTrue(outputs.loss is not None      )







'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


_a   :	Dict 							=   {"configuration_reformer": ["REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "ReformerConfig"]}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	Dict 							=   ["ReformerTokenizer"]

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	List[Any] 							=   ["ReformerTokenizerFast"]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	int 							=   [
       "REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
       "ReformerAttention",
       "ReformerForMaskedLM",
       "ReformerForQuestionAnswering",
       "ReformerForSequenceClassification",
       "ReformerLayer",
       "ReformerModel",
       "ReformerModelWithLMHead",
       "ReformerPreTrainedModel",
   ]


if TYPE_CHECKING:
   from .configuration_reformer import REFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, ReformerConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_reformer import ReformerTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_reformer_fast import ReformerTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_reformer import (
          REFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          ReformerAttention,
          ReformerForMaskedLM,
          ReformerForQuestionAnswering,
          ReformerForSequenceClassification,
          ReformerLayer,
          ReformerModel,
          ReformerModelWithLMHead,
          ReformerPreTrainedModel,
      )

else:
   import sys

   _a   :	Optional[int] 							=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






