


from typing import Dict, List, Optional, Tuple, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import (
    center_crop,
    flip_channel_order,
    get_resize_output_image_size,
    rescale,
    resize,
    to_channel_dimension_format,
)
from ...image_utils import (
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_torch_available, is_torch_tensor, is_vision_available, logging


if is_vision_available():
		import PIL

if is_torch_available():
		import torch


lowerCamelCase						=		logging.get_logger(__name__)





class  _a							(    _lowercase):
	_a  :  int				   =							['''pixel_values''']




	def __init__( self						:		List[str]		, _SCREAMING_SNAKE_CASE						:		bool = True		, _SCREAMING_SNAKE_CASE						:		Dict[str, int] = None		, _SCREAMING_SNAKE_CASE						:		PILImageResampling = PILImageResampling.BILINEAR		, _SCREAMING_SNAKE_CASE						:		bool = True		, _SCREAMING_SNAKE_CASE						:		Union[int, float] = 1 / 255		, _SCREAMING_SNAKE_CASE						:		bool = True		, _SCREAMING_SNAKE_CASE						:		Dict[str, int] = None		, _SCREAMING_SNAKE_CASE						:		bool = True		, **_SCREAMING_SNAKE_CASE						:		Tuple		, )->	None:
			super().__init__(**_SCREAMING_SNAKE_CASE		)
			lowerCAmelCase__       :      Optional[Any]   					= size if size is not None else {'''shortest_edge''': 224}
			lowerCAmelCase__       :      List[str]   					= get_size_dict(_SCREAMING_SNAKE_CASE		, default_to_square=_SCREAMING_SNAKE_CASE		)
			lowerCAmelCase__       :      List[str]   					= crop_size if crop_size is not None else {'''height''': 256, '''width''': 256}
			lowerCAmelCase__       :      Optional[Any]   					= get_size_dict(_SCREAMING_SNAKE_CASE		, param_name='''crop_size'''		)

			lowerCAmelCase__       :      List[Any]   					= do_resize
			lowerCAmelCase__       :      List[str]   					= size
			lowerCAmelCase__       :      Any   					= resample
			lowerCAmelCase__       :      Tuple   					= do_rescale
			lowerCAmelCase__       :      List[str]   					= rescale_factor
			lowerCAmelCase__       :      Tuple   					= do_center_crop
			lowerCAmelCase__       :      int   					= crop_size
			lowerCAmelCase__       :      int   					= do_flip_channel_order




	def 							UpperCAmelCase__( self						:		Optional[Any]		, _SCREAMING_SNAKE_CASE						:		np.ndarray		, _SCREAMING_SNAKE_CASE						:		Dict[str, int]		, _SCREAMING_SNAKE_CASE						:		PILImageResampling = PIL.Image.BILINEAR		, _SCREAMING_SNAKE_CASE						:		Optional[Union[str, ChannelDimension]] = None		, **_SCREAMING_SNAKE_CASE						:		Tuple		, )->	np.ndarray:
			lowerCAmelCase__       :      Tuple   					= get_size_dict(_SCREAMING_SNAKE_CASE		, default_to_square=_SCREAMING_SNAKE_CASE		)
			if "shortest_edge" not in size:
					raise ValueError(F'The `size` dictionary must contain the key `shortest_edge`. Got {size.keys()}'		)
			lowerCAmelCase__       :      Optional[int]   					= get_resize_output_image_size(_SCREAMING_SNAKE_CASE		, size=size['''shortest_edge''']		, default_to_square=_SCREAMING_SNAKE_CASE		)
			return resize(_SCREAMING_SNAKE_CASE		, size=_SCREAMING_SNAKE_CASE		, resample=_SCREAMING_SNAKE_CASE		, data_format=_SCREAMING_SNAKE_CASE		, **_SCREAMING_SNAKE_CASE		)




	def 							UpperCAmelCase__( self						:		List[Any]		, _SCREAMING_SNAKE_CASE						:		np.ndarray		, _SCREAMING_SNAKE_CASE						:		Dict[str, int]		, _SCREAMING_SNAKE_CASE						:		Optional[Union[str, ChannelDimension]] = None		, **_SCREAMING_SNAKE_CASE						:		List[str]		, )->	np.ndarray:
			lowerCAmelCase__       :      List[str]   					= get_size_dict(_SCREAMING_SNAKE_CASE		)
			if "height" not in size or "width" not in size:
					raise ValueError(F'The `size` dictionary must contain the keys `height` and `width`. Got {size.keys()}'		)
			return center_crop(_SCREAMING_SNAKE_CASE		, size=(size['''height'''], size['''width'''])		, data_format=_SCREAMING_SNAKE_CASE		, **_SCREAMING_SNAKE_CASE		)




	def 							UpperCAmelCase__( self						:		Any		, _SCREAMING_SNAKE_CASE						:		np.ndarray		, _SCREAMING_SNAKE_CASE						:		Union[int, float]		, _SCREAMING_SNAKE_CASE						:		Optional[Union[str, ChannelDimension]] = None		, **_SCREAMING_SNAKE_CASE						:		int		, )->	Any:
			return rescale(_SCREAMING_SNAKE_CASE		, scale=_SCREAMING_SNAKE_CASE		, data_format=_SCREAMING_SNAKE_CASE		, **_SCREAMING_SNAKE_CASE		)




	def 							UpperCAmelCase__( self						:		int		, _SCREAMING_SNAKE_CASE						:		np.ndarray		, _SCREAMING_SNAKE_CASE						:		Optional[Union[str, ChannelDimension]] = None		)->	np.ndarray:
			return flip_channel_order(_SCREAMING_SNAKE_CASE		, data_format=_SCREAMING_SNAKE_CASE		)




	def 							UpperCAmelCase__( self						:		Any		, _SCREAMING_SNAKE_CASE						:		ImageInput		, _SCREAMING_SNAKE_CASE						:		bool = None		, _SCREAMING_SNAKE_CASE						:		Dict[str, int] = None		, _SCREAMING_SNAKE_CASE						:		PILImageResampling = None		, _SCREAMING_SNAKE_CASE						:		bool = None		, _SCREAMING_SNAKE_CASE						:		float = None		, _SCREAMING_SNAKE_CASE						:		bool = None		, _SCREAMING_SNAKE_CASE						:		Dict[str, int] = None		, _SCREAMING_SNAKE_CASE						:		bool = None		, _SCREAMING_SNAKE_CASE						:		Optional[Union[str, TensorType]] = None		, _SCREAMING_SNAKE_CASE						:		ChannelDimension = ChannelDimension.FIRST		, **_SCREAMING_SNAKE_CASE						:		Union[str, Any]		, )->	PIL.Image.Image:
			lowerCAmelCase__       :      Union[str, Any]   					= do_resize if do_resize is not None else self.do_resize
			lowerCAmelCase__       :      Dict   					= resample if resample is not None else self.resample
			lowerCAmelCase__       :      Union[str, Any]   					= do_rescale if do_rescale is not None else self.do_rescale
			lowerCAmelCase__       :      int   					= rescale_factor if rescale_factor is not None else self.rescale_factor
			lowerCAmelCase__       :      Union[str, Any]   					= do_center_crop if do_center_crop is not None else self.do_center_crop
			lowerCAmelCase__       :      List[str]   					= (
			    do_flip_channel_order if do_flip_channel_order is not None else self.do_flip_channel_order
			)

			lowerCAmelCase__       :      Optional[Any]   					= size if size is not None else self.size
			lowerCAmelCase__       :      Optional[Any]   					= get_size_dict(_SCREAMING_SNAKE_CASE		, default_to_square=_SCREAMING_SNAKE_CASE		)
			lowerCAmelCase__       :      Any   					= crop_size if crop_size is not None else self.crop_size
			lowerCAmelCase__       :      List[Any]   					= get_size_dict(_SCREAMING_SNAKE_CASE		, param_name='''crop_size'''		)

			lowerCAmelCase__       :      Optional[int]   					= make_list_of_images(_SCREAMING_SNAKE_CASE		)

			if not valid_images(_SCREAMING_SNAKE_CASE		):
					raise ValueError(
					    '''Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, '''
					    '''torch.Tensor, tf.Tensor or jax.ndarray.'''		)

			if do_resize and size is None:
					raise ValueError('''Size must be specified if do_resize is True.'''		)

			if do_rescale and rescale_factor is None:
					raise ValueError('''Rescale factor must be specified if do_rescale is True.'''		)

			if do_center_crop and crop_size is None:
					raise ValueError('''Crop size must be specified if do_center_crop is True.'''		)

			# All transformations expect numpy arrays.
			lowerCAmelCase__       :      List[Any]   					= [to_numpy_array(_SCREAMING_SNAKE_CASE		) for image in images]

			if do_resize:
					lowerCAmelCase__       :      Tuple   					= [self.resize(image=_SCREAMING_SNAKE_CASE		, size=_SCREAMING_SNAKE_CASE		, resample=_SCREAMING_SNAKE_CASE		) for image in images]

			if do_center_crop:
					lowerCAmelCase__       :      str   					= [self.center_crop(image=_SCREAMING_SNAKE_CASE		, size=_SCREAMING_SNAKE_CASE		) for image in images]

			if do_rescale:
					lowerCAmelCase__       :      List[str]   					= [self.rescale(image=_SCREAMING_SNAKE_CASE		, scale=_SCREAMING_SNAKE_CASE		) for image in images]

			# the pretrained checkpoints assume images are BGR, not RGB
			if do_flip_channel_order:
					lowerCAmelCase__       :      str   					= [self.flip_channel_order(image=_SCREAMING_SNAKE_CASE		) for image in images]

			lowerCAmelCase__       :      Any   					= [to_channel_dimension_format(_SCREAMING_SNAKE_CASE		, _SCREAMING_SNAKE_CASE		) for image in images]

			lowerCAmelCase__       :      int   					= {'''pixel_values''': images}
			return BatchFeature(data=_SCREAMING_SNAKE_CASE		, tensor_type=_SCREAMING_SNAKE_CASE		)




	def 							UpperCAmelCase__( self						:		Optional[Any]		, _SCREAMING_SNAKE_CASE						:		Any		, _SCREAMING_SNAKE_CASE						:		List[Tuple] = None		)->	str:
			lowerCAmelCase__       :      Union[str, Any]   					= outputs.logits

			# Resize logits and compute semantic segmentation maps
			if target_sizes is not None:
					if len(_SCREAMING_SNAKE_CASE		) != len(_SCREAMING_SNAKE_CASE		):
							raise ValueError(
							    '''Make sure that you pass in as many target sizes as the batch dimension of the logits'''		)

					if is_torch_tensor(_SCREAMING_SNAKE_CASE		):
							lowerCAmelCase__       :      Optional[int]   					= target_sizes.numpy()

					lowerCAmelCase__       :      List[str]   					= []

					for idx in range(len(_SCREAMING_SNAKE_CASE		)		):
							lowerCAmelCase__       :      Union[str, Any]   					= torch.nn.functional.interpolate(
							    logits[idx].unsqueeze(dim=0		)		, size=target_sizes[idx]		, mode='''bilinear'''		, align_corners=_SCREAMING_SNAKE_CASE		)
							lowerCAmelCase__       :      List[Any]   					= resized_logits[0].argmax(dim=0		)
							semantic_segmentation.append(_SCREAMING_SNAKE_CASE		)
			else:
					lowerCAmelCase__       :      Union[str, Any]   					= logits.argmax(dim=1		)
					lowerCAmelCase__       :      Union[str, Any]   					= [semantic_segmentation[i] for i in range(semantic_segmentation.shape[0]		)]

			return semantic_segmentation








from collections import OrderedDict

from ...utils import logging
from .auto_factory import _BaseAutoModelClass, _LazyAutoMapping, auto_class_update
from .configuration_auto import CONFIG_MAPPING_NAMES


lowerCamelCase						=		logging.get_logger(__name__)


lowerCamelCase						=		OrderedDict(
    [
        # Base model mapping
        ('''albert''', '''FlaxAlbertModel'''),
        ('''bart''', '''FlaxBartModel'''),
        ('''beit''', '''FlaxBeitModel'''),
        ('''bert''', '''FlaxBertModel'''),
        ('''big_bird''', '''FlaxBigBirdModel'''),
        ('''blenderbot''', '''FlaxBlenderbotModel'''),
        ('''blenderbot-small''', '''FlaxBlenderbotSmallModel'''),
        ('''clip''', '''FlaxCLIPModel'''),
        ('''distilbert''', '''FlaxDistilBertModel'''),
        ('''electra''', '''FlaxElectraModel'''),
        ('''gpt-sw3''', '''FlaxGPT2Model'''),
        ('''gpt2''', '''FlaxGPT2Model'''),
        ('''gpt_neo''', '''FlaxGPTNeoModel'''),
        ('''gptj''', '''FlaxGPTJModel'''),
        ('''longt5''', '''FlaxLongT5Model'''),
        ('''marian''', '''FlaxMarianModel'''),
        ('''mbart''', '''FlaxMBartModel'''),
        ('''mt5''', '''FlaxMT5Model'''),
        ('''opt''', '''FlaxOPTModel'''),
        ('''pegasus''', '''FlaxPegasusModel'''),
        ('''regnet''', '''FlaxRegNetModel'''),
        ('''resnet''', '''FlaxResNetModel'''),
        ('''roberta''', '''FlaxRobertaModel'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormModel'''),
        ('''roformer''', '''FlaxRoFormerModel'''),
        ('''t5''', '''FlaxT5Model'''),
        ('''vision-text-dual-encoder''', '''FlaxVisionTextDualEncoderModel'''),
        ('''vit''', '''FlaxViTModel'''),
        ('''wav2vec2''', '''FlaxWav2Vec2Model'''),
        ('''whisper''', '''FlaxWhisperModel'''),
        ('''xglm''', '''FlaxXGLMModel'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaModel'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for pre-training mapping
        ('''albert''', '''FlaxAlbertForPreTraining'''),
        ('''bart''', '''FlaxBartForConditionalGeneration'''),
        ('''bert''', '''FlaxBertForPreTraining'''),
        ('''big_bird''', '''FlaxBigBirdForPreTraining'''),
        ('''electra''', '''FlaxElectraForPreTraining'''),
        ('''longt5''', '''FlaxLongT5ForConditionalGeneration'''),
        ('''mbart''', '''FlaxMBartForConditionalGeneration'''),
        ('''mt5''', '''FlaxMT5ForConditionalGeneration'''),
        ('''roberta''', '''FlaxRobertaForMaskedLM'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForMaskedLM'''),
        ('''roformer''', '''FlaxRoFormerForMaskedLM'''),
        ('''t5''', '''FlaxT5ForConditionalGeneration'''),
        ('''wav2vec2''', '''FlaxWav2Vec2ForPreTraining'''),
        ('''whisper''', '''FlaxWhisperForConditionalGeneration'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForMaskedLM'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Masked LM mapping
        ('''albert''', '''FlaxAlbertForMaskedLM'''),
        ('''bart''', '''FlaxBartForConditionalGeneration'''),
        ('''bert''', '''FlaxBertForMaskedLM'''),
        ('''big_bird''', '''FlaxBigBirdForMaskedLM'''),
        ('''distilbert''', '''FlaxDistilBertForMaskedLM'''),
        ('''electra''', '''FlaxElectraForMaskedLM'''),
        ('''mbart''', '''FlaxMBartForConditionalGeneration'''),
        ('''roberta''', '''FlaxRobertaForMaskedLM'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForMaskedLM'''),
        ('''roformer''', '''FlaxRoFormerForMaskedLM'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForMaskedLM'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Seq2Seq Causal LM mapping
        ('''bart''', '''FlaxBartForConditionalGeneration'''),
        ('''blenderbot''', '''FlaxBlenderbotForConditionalGeneration'''),
        ('''blenderbot-small''', '''FlaxBlenderbotSmallForConditionalGeneration'''),
        ('''encoder-decoder''', '''FlaxEncoderDecoderModel'''),
        ('''longt5''', '''FlaxLongT5ForConditionalGeneration'''),
        ('''marian''', '''FlaxMarianMTModel'''),
        ('''mbart''', '''FlaxMBartForConditionalGeneration'''),
        ('''mt5''', '''FlaxMT5ForConditionalGeneration'''),
        ('''pegasus''', '''FlaxPegasusForConditionalGeneration'''),
        ('''t5''', '''FlaxT5ForConditionalGeneration'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Image-classsification
        ('''beit''', '''FlaxBeitForImageClassification'''),
        ('''regnet''', '''FlaxRegNetForImageClassification'''),
        ('''resnet''', '''FlaxResNetForImageClassification'''),
        ('''vit''', '''FlaxViTForImageClassification'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        ('''vision-encoder-decoder''', '''FlaxVisionEncoderDecoderModel'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Causal LM mapping
        ('''bart''', '''FlaxBartForCausalLM'''),
        ('''bert''', '''FlaxBertForCausalLM'''),
        ('''big_bird''', '''FlaxBigBirdForCausalLM'''),
        ('''electra''', '''FlaxElectraForCausalLM'''),
        ('''gpt-sw3''', '''FlaxGPT2LMHeadModel'''),
        ('''gpt2''', '''FlaxGPT2LMHeadModel'''),
        ('''gpt_neo''', '''FlaxGPTNeoForCausalLM'''),
        ('''gptj''', '''FlaxGPTJForCausalLM'''),
        ('''opt''', '''FlaxOPTForCausalLM'''),
        ('''roberta''', '''FlaxRobertaForCausalLM'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForCausalLM'''),
        ('''xglm''', '''FlaxXGLMForCausalLM'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForCausalLM'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Sequence Classification mapping
        ('''albert''', '''FlaxAlbertForSequenceClassification'''),
        ('''bart''', '''FlaxBartForSequenceClassification'''),
        ('''bert''', '''FlaxBertForSequenceClassification'''),
        ('''big_bird''', '''FlaxBigBirdForSequenceClassification'''),
        ('''distilbert''', '''FlaxDistilBertForSequenceClassification'''),
        ('''electra''', '''FlaxElectraForSequenceClassification'''),
        ('''mbart''', '''FlaxMBartForSequenceClassification'''),
        ('''roberta''', '''FlaxRobertaForSequenceClassification'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForSequenceClassification'''),
        ('''roformer''', '''FlaxRoFormerForSequenceClassification'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForSequenceClassification'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Question Answering mapping
        ('''albert''', '''FlaxAlbertForQuestionAnswering'''),
        ('''bart''', '''FlaxBartForQuestionAnswering'''),
        ('''bert''', '''FlaxBertForQuestionAnswering'''),
        ('''big_bird''', '''FlaxBigBirdForQuestionAnswering'''),
        ('''distilbert''', '''FlaxDistilBertForQuestionAnswering'''),
        ('''electra''', '''FlaxElectraForQuestionAnswering'''),
        ('''mbart''', '''FlaxMBartForQuestionAnswering'''),
        ('''roberta''', '''FlaxRobertaForQuestionAnswering'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForQuestionAnswering'''),
        ('''roformer''', '''FlaxRoFormerForQuestionAnswering'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForQuestionAnswering'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Token Classification mapping
        ('''albert''', '''FlaxAlbertForTokenClassification'''),
        ('''bert''', '''FlaxBertForTokenClassification'''),
        ('''big_bird''', '''FlaxBigBirdForTokenClassification'''),
        ('''distilbert''', '''FlaxDistilBertForTokenClassification'''),
        ('''electra''', '''FlaxElectraForTokenClassification'''),
        ('''roberta''', '''FlaxRobertaForTokenClassification'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForTokenClassification'''),
        ('''roformer''', '''FlaxRoFormerForTokenClassification'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForTokenClassification'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        # Model for Multiple Choice mapping
        ('''albert''', '''FlaxAlbertForMultipleChoice'''),
        ('''bert''', '''FlaxBertForMultipleChoice'''),
        ('''big_bird''', '''FlaxBigBirdForMultipleChoice'''),
        ('''distilbert''', '''FlaxDistilBertForMultipleChoice'''),
        ('''electra''', '''FlaxElectraForMultipleChoice'''),
        ('''roberta''', '''FlaxRobertaForMultipleChoice'''),
        ('''roberta-prelayernorm''', '''FlaxRobertaPreLayerNormForMultipleChoice'''),
        ('''roformer''', '''FlaxRoFormerForMultipleChoice'''),
        ('''xlm-roberta''', '''FlaxXLMRobertaForMultipleChoice'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        ('''bert''', '''FlaxBertForNextSentencePrediction'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        ('''speech-encoder-decoder''', '''FlaxSpeechEncoderDecoderModel'''),
        ('''whisper''', '''FlaxWhisperForConditionalGeneration'''),
    ]
)

lowerCamelCase						=		OrderedDict(
    [
        ('''whisper''', '''FlaxWhisperForAudioClassification'''),
    ]
)

lowerCamelCase						=		_LazyAutoMapping(CONFIG_MAPPING_NAMES, FLAX_MODEL_MAPPING_NAMES)
lowerCamelCase						=		_LazyAutoMapping(CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_PRETRAINING_MAPPING_NAMES)
lowerCamelCase						=		_LazyAutoMapping(CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_MASKED_LM_MAPPING_NAMES)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_VISION_2_SEQ_MAPPING_NAMES)
lowerCamelCase						=		_LazyAutoMapping(CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_CAUSAL_LM_MAPPING_NAMES)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_QUESTION_ANSWERING_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_MULTIPLE_CHOICE_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES
)
lowerCamelCase						=		_LazyAutoMapping(
    CONFIG_MAPPING_NAMES, FLAX_MODEL_FOR_AUDIO_CLASSIFICATION_MAPPING_NAMES
)





class  _a							(    _BaseAutoModelClass):
	_a  :  List[str]				   =							FLAX_MODEL_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModel)





class  _a							(    _BaseAutoModelClass):
	_a  :  Union[str, Any]				   =							FLAX_MODEL_FOR_PRETRAINING_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForPreTraining, head_doc='''pretraining''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Optional[Any]				   =							FLAX_MODEL_FOR_CAUSAL_LM_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForCausalLM, head_doc='''causal language modeling''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Tuple				   =							FLAX_MODEL_FOR_MASKED_LM_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForMaskedLM, head_doc='''masked language modeling''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Dict				   =							FLAX_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForSeqaSeqLM, head_doc='''sequence-to-sequence language modeling''', checkpoint_for_example='''t5-base'''
)





class  _a							(    _BaseAutoModelClass):
	_a  :  Union[str, Any]				   =							FLAX_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForSequenceClassification, head_doc='''sequence classification'''
)





class  _a							(    _BaseAutoModelClass):
	_a  :  str				   =							FLAX_MODEL_FOR_QUESTION_ANSWERING_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForQuestionAnswering, head_doc='''question answering''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Union[str, Any]				   =							FLAX_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForTokenClassification, head_doc='''token classification'''
)





class  _a							(    _BaseAutoModelClass):
	_a  :  List[Any]				   =							FLAX_MODEL_FOR_MULTIPLE_CHOICE_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForMultipleChoice, head_doc='''multiple choice''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Any				   =							FLAX_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForNextSentencePrediction, head_doc='''next sentence prediction'''
)





class  _a							(    _BaseAutoModelClass):
	_a  :  List[Any]				   =							FLAX_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForImageClassification, head_doc='''image classification'''
)





class  _a							(    _BaseAutoModelClass):
	_a  :  List[Any]				   =							FLAX_MODEL_FOR_VISION_2_SEQ_MAPPING
lowerCamelCase						=		auto_class_update(FlaxAutoModelForVisionaSeq, head_doc='''vision-to-text modeling''')





class  _a							(    _BaseAutoModelClass):
	_a  :  Optional[Any]				   =							FLAX_MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING
lowerCamelCase						=		auto_class_update(
    FlaxAutoModelForSpeechSeqaSeq, head_doc='''sequence-to-sequence speech-to-text modeling'''
)




