
import unittest

from transformers import MobileBertConfig, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
				import torch

				from transformers import (
				    MODEL_FOR_PRETRAINING_MAPPING,
				    MobileBertForMaskedLM,
				    MobileBertForMultipleChoice,
				    MobileBertForNextSentencePrediction,
				    MobileBertForPreTraining,
				    MobileBertForQuestionAnswering,
				    MobileBertForSequenceClassification,
				    MobileBertForTokenClassification,
				    MobileBertModel,
				)






class        SCREAMING_SNAKE_CASE__    :

							"""simple docstring"""






							def __init__(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_=13     ,	SCREAMING_SNAKE_CASE_=7     ,	SCREAMING_SNAKE_CASE_=True     ,	SCREAMING_SNAKE_CASE_=True     ,	SCREAMING_SNAKE_CASE_=True     ,	SCREAMING_SNAKE_CASE_=True     ,	SCREAMING_SNAKE_CASE_=99     ,	SCREAMING_SNAKE_CASE_=64     ,	SCREAMING_SNAKE_CASE_=32     ,	SCREAMING_SNAKE_CASE_=5     ,	SCREAMING_SNAKE_CASE_=4     ,	SCREAMING_SNAKE_CASE_=37     ,	SCREAMING_SNAKE_CASE_="gelu"     ,	SCREAMING_SNAKE_CASE_=0.1     ,	SCREAMING_SNAKE_CASE_=0.1     ,	SCREAMING_SNAKE_CASE_=512     ,	SCREAMING_SNAKE_CASE_=16     ,	SCREAMING_SNAKE_CASE_=2     ,	SCREAMING_SNAKE_CASE_=0.0_2     ,	SCREAMING_SNAKE_CASE_=3     ,	SCREAMING_SNAKE_CASE_=4     ,	SCREAMING_SNAKE_CASE_=None     ,	)->   Dict:





													'''simple docstring'''






													__UpperCamelCase       =			parent
													__UpperCamelCase       =			batch_size
													__UpperCamelCase       =			seq_length
													__UpperCamelCase       =			is_training
													__UpperCamelCase       =			use_input_mask
													__UpperCamelCase       =			use_token_type_ids
													__UpperCamelCase       =			use_labels
													__UpperCamelCase       =			vocab_size
													__UpperCamelCase       =			hidden_size
													__UpperCamelCase       =			embedding_size
													__UpperCamelCase       =			num_hidden_layers
													__UpperCamelCase       =			num_attention_heads
													__UpperCamelCase       =			intermediate_size
													__UpperCamelCase       =			hidden_act
													__UpperCamelCase       =			hidden_dropout_prob
													__UpperCamelCase       =			attention_probs_dropout_prob
													__UpperCamelCase       =			max_position_embeddings
													__UpperCamelCase       =			type_vocab_size
													__UpperCamelCase       =			type_sequence_label_size
													__UpperCamelCase       =			initializer_range
													__UpperCamelCase       =			num_labels
													__UpperCamelCase       =			num_choices
													__UpperCamelCase       =			scope



							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			ids_tensor([self.batch_size, self.seq_length]     ,	self.vocab_size			)

													__UpperCamelCase       =			None
													if self.use_input_mask:
																			__UpperCamelCase       =			random_attention_mask([self.batch_size, self.seq_length]			)

													__UpperCamelCase       =			None
													if self.use_token_type_ids:
																			__UpperCamelCase       =			ids_tensor([self.batch_size, self.seq_length]     ,	self.type_vocab_size			)

													__UpperCamelCase       =			None
													__UpperCamelCase       =			None
													__UpperCamelCase       =			None
													if self.use_labels:
																			__UpperCamelCase       =			ids_tensor([self.batch_size]     ,	self.type_sequence_label_size			)
																			__UpperCamelCase       =			ids_tensor([self.batch_size, self.seq_length]     ,	self.num_labels			)
																			__UpperCamelCase       =			ids_tensor([self.batch_size]     ,	self.num_choices			)

													__UpperCamelCase       =			self.get_config()

													return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													return MobileBertConfig(
													    vocab_size=self.vocab_size     ,	hidden_size=self.hidden_size     ,	num_hidden_layers=self.num_hidden_layers     ,	num_attention_heads=self.num_attention_heads     ,	intermediate_size=self.intermediate_size     ,	embedding_size=self.embedding_size     ,	hidden_act=self.hidden_act     ,	hidden_dropout_prob=self.hidden_dropout_prob     ,	attention_probs_dropout_prob=self.attention_probs_dropout_prob     ,	max_position_embeddings=self.max_position_embeddings     ,	type_vocab_size=self.type_vocab_size     ,	is_decoder=SCREAMING_SNAKE_CASE_     ,	initializer_range=self.initializer_range     ,	)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertModel(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_			)
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_			)
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_			)

													self.parent.assertEqual(result.last_hidden_state.shape     ,	(self.batch_size, self.seq_length, self.hidden_size)			)
													self.parent.assertEqual(result.pooler_output.shape     ,	(self.batch_size, self.hidden_size)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertForMaskedLM(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_			)
													self.parent.assertEqual(result.logits.shape     ,	(self.batch_size, self.seq_length, self.vocab_size)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   List[str]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertForNextSentencePrediction(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(
													    SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_     ,	)
													self.parent.assertEqual(result.logits.shape     ,	(self.batch_size, 2)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Optional[int]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertForPreTraining(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(
													    SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_     ,	next_sentence_label=SCREAMING_SNAKE_CASE_     ,	)
													self.parent.assertEqual(result.prediction_logits.shape     ,	(self.batch_size, self.seq_length, self.vocab_size)			)
													self.parent.assertEqual(result.seq_relationship_logits.shape     ,	(self.batch_size, 2)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertForQuestionAnswering(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(
													    SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	start_positions=SCREAMING_SNAKE_CASE_     ,	end_positions=SCREAMING_SNAKE_CASE_     ,	)
													self.parent.assertEqual(result.start_logits.shape     ,	(self.batch_size, self.seq_length)			)
													self.parent.assertEqual(result.end_logits.shape     ,	(self.batch_size, self.seq_length)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.num_labels
													__UpperCamelCase       =			MobileBertForSequenceClassification(SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_			)
													self.parent.assertEqual(result.logits.shape     ,	(self.batch_size, self.num_labels)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Dict:





													'''simple docstring'''






													__UpperCamelCase       =			self.num_labels
													__UpperCamelCase       =			MobileBertForTokenClassification(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_			)
													self.parent.assertEqual(result.logits.shape     ,	(self.batch_size, self.seq_length, self.num_labels)			)



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.num_choices
													__UpperCamelCase       =			MobileBertForMultipleChoice(config=SCREAMING_SNAKE_CASE_			)
													model.to(SCREAMING_SNAKE_CASE_			)
													model.eval()
													__UpperCamelCase       =			input_ids.unsqueeze(1			).expand(-1     ,	self.num_choices     ,	-1			).contiguous()
													__UpperCamelCase       =			token_type_ids.unsqueeze(1			).expand(-1     ,	self.num_choices     ,	-1			).contiguous()
													__UpperCamelCase       =			input_mask.unsqueeze(1			).expand(-1     ,	self.num_choices     ,	-1			).contiguous()
													__UpperCamelCase       =			model(
													    SCREAMING_SNAKE_CASE_     ,	attention_mask=SCREAMING_SNAKE_CASE_     ,	token_type_ids=SCREAMING_SNAKE_CASE_     ,	labels=SCREAMING_SNAKE_CASE_     ,	)
													self.parent.assertEqual(result.logits.shape     ,	(self.batch_size, self.num_choices)			)



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.prepare_config_and_inputs()
													(
													    (
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,							(
													    __UpperCamelCase							
													)  ,														
													)       =			config_and_inputs
													__UpperCamelCase       =			{'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''attention_mask''': input_mask}
													return config, inputs_dict






@require_torch
class        SCREAMING_SNAKE_CASE__    (							SCREAMING_SNAKE_CASE_   ,		SCREAMING_SNAKE_CASE_   ,		unittest.TestCase    ):

							"""simple docstring"""






							_snake_case     		=  (
							    (
							        MobileBertModel,
							        MobileBertForMaskedLM,
							        MobileBertForMultipleChoice,
							        MobileBertForNextSentencePrediction,
							        MobileBertForPreTraining,
							        MobileBertForQuestionAnswering,
							        MobileBertForSequenceClassification,
							        MobileBertForTokenClassification,
							    )
							    if is_torch_available()
							    else ()
							)
							_snake_case     		=  (
							    {
							        'feature-extraction': MobileBertModel,
							        'fill-mask': MobileBertForMaskedLM,
							        'question-answering': MobileBertForQuestionAnswering,
							        'text-classification': MobileBertForSequenceClassification,
							        'token-classification': MobileBertForTokenClassification,
							        'zero-shot': MobileBertForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)
							_snake_case     		=  True



							def     A__		(  self     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_=False			)->   Any:





													'''simple docstring'''






													__UpperCamelCase       =			super()._prepare_for_class(SCREAMING_SNAKE_CASE_     ,	SCREAMING_SNAKE_CASE_     ,	return_labels=SCREAMING_SNAKE_CASE_			)

													if return_labels:
																			if model_class in get_values(SCREAMING_SNAKE_CASE_			):
																									__UpperCamelCase       =			torch.zeros(
																									    (self.model_tester.batch_size, self.model_tester.seq_length)     ,	dtype=torch.long     ,	device=SCREAMING_SNAKE_CASE_			)
																									__UpperCamelCase       =			torch.zeros(
																									    self.model_tester.batch_size     ,	dtype=torch.long     ,	device=SCREAMING_SNAKE_CASE_			)
													return inputs_dict



							def     A__		(  self			)->   Optional[int]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertModelTester(self			)
													__UpperCamelCase       =			ConfigTester(self     ,	config_class=SCREAMING_SNAKE_CASE_     ,	hidden_size=37			)



							def     A__		(  self			)->   Dict:





													'''simple docstring'''






													self.config_tester.run_common_tests()



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_model(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_masked_lm(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_multiple_choice(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_next_sequence_prediction(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   str:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_pretraining(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   Optional[Any]:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_question_answering(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_sequence_classification(*SCREAMING_SNAKE_CASE_			)



							def     A__		(  self			)->   int:





													'''simple docstring'''






													__UpperCamelCase       =			self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_mobilebert_for_token_classification(*SCREAMING_SNAKE_CASE_			)





def 	A_ (							snake_case							:   Tuple )      ->    int:
						return torch.tensor(
						    snake_case ,      dtype=torch.long ,      device=snake_case ,      )


lowercase__							:							Optional[int]									=			1e-3






@require_torch
@require_sentencepiece
@require_tokenizers
class        SCREAMING_SNAKE_CASE__    (							unittest.TestCase    ):

							"""simple docstring"""






							@slow
							def     A__		(  self			)->   List[str]:





													'''simple docstring'''






													__UpperCamelCase       =			MobileBertModel.from_pretrained('''google/mobilebert-uncased'''			).to(SCREAMING_SNAKE_CASE_			)
													__UpperCamelCase       =			_long_tensor([[101, 7110, 1005, 1056, 2023, 11333, 17413, 1029, 102]]			)
													with torch.no_grad():
																			__UpperCamelCase       =			model(SCREAMING_SNAKE_CASE_			)[0]
													__UpperCamelCase       =			torch.Size((1, 9, 512)			)
													self.assertEqual(output.shape     ,	SCREAMING_SNAKE_CASE_			)
													__UpperCamelCase       =			torch.tensor(
													    [
													        [
													            [-2.473_6526E07, 8.269_1656E04, 1.652_1838E05],
													            [-5.754_1704E-01, 3.905_6022E00, 4.401_1507E00],
													            [2.604_7359E00, 1.567_7652E00, -1.732_4188E-01],
													        ]
													    ]     ,	device=SCREAMING_SNAKE_CASE_     ,	)

													# MobileBERT results range from 10e0 to 10e8. Even a 0.0000001% difference with a value of 10e8 results in a
													# ~1 difference, it's therefore not a good idea to measure using addition.
													# Here, we instead divide the expected result with the result in order to obtain ~1. We then check that the
													# result is held between bounds: 1 - TOLERANCE < expected_result / result < 1 + TOLERANCE
													__UpperCamelCase       =			torch.all((expected_slice / output[..., :3, :3]) >= 1 - TOLERANCE			)
													__UpperCamelCase       =			torch.all((expected_slice / output[..., :3, :3]) <= 1 + TOLERANCE			)

													self.assertTrue(lower_bound and upper_bound			)






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


lowercase__							:							Dict									=			{"configuration_vit": ["VIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "ViTConfig", "ViTOnnxConfig"]}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							Tuple									=			["ViTFeatureExtractor"]
				lowercase__							:							str									=			["ViTImageProcessor"]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							List[str]									=			[
				    "VIT_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "ViTForImageClassification",
				    "ViTForMaskedImageModeling",
				    "ViTModel",
				    "ViTPreTrainedModel",
				]

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							Tuple									=			[
				    "TFViTForImageClassification",
				    "TFViTModel",
				    "TFViTPreTrainedModel",
				]

try:
				if not is_flax_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowercase__							:							List[Any]									=			[
				    "FlaxViTForImageClassification",
				    "FlaxViTModel",
				    "FlaxViTPreTrainedModel",
				]

if TYPE_CHECKING:
				from .configuration_vit import VIT_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTConfig, ViTOnnxConfig

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .feature_extraction_vit import ViTFeatureExtractor
								from .image_processing_vit import ViTImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_vit import (
								    VIT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    ViTForImageClassification,
								    ViTForMaskedImageModeling,
								    ViTModel,
								    ViTPreTrainedModel,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_vit import TFViTForImageClassification, TFViTModel, TFViTPreTrainedModel

				try:
								if not is_flax_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel, FlaxViTPreTrainedModel


else:
				import sys

				lowercase__							:							List[Any]									=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




