



from typing import Optional, Tuple, Union

import tensorflow as tf

from ...activations_tf import ACTaFN
from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
from ...modeling_tf_outputs import (
    TFBaseModelOutputWithNoAttention,
    TFBaseModelOutputWithPoolingAndNoAttention,
    TFSequenceClassifierOutput,
)
from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
from ...tf_utils import shape_list
from ...utils import logging
from .configuration_regnet import RegNetConfig


lowercase_						=       logging.get_logger(__name__)

# General docstring
lowercase_						=       """RegNetConfig"""

# Base docstring
lowercase_						=       """facebook/regnet-y-040"""
lowercase_						=       [1, 1088, 7, 7]

# Image classification docstring
lowercase_						=       """facebook/regnet-y-040"""
lowercase_						=       """tabby, tabby cat"""

lowercase_						=       [
    """facebook/regnet-y-040""",
    # See all regnet models at https://huggingface.co/models?filter=regnet
]
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Any,   __lowercase   :  int,   __lowercase   :  int = 3,   __lowercase   :  int = 1,   __lowercase   :  int = 1,   __lowercase   :  Optional[str] = "relu",   **__lowercase   :  int,   ):
							super().__init__(**__lowercase  )
							# The padding and conv has been verified in
							# https://colab.research.google.com/gist/sayakpaul/854bc10eeaf21c9ee2119e0b9f3841a7/scratchpad.ipynb
							lowercase__   					=			tf.keras.layers.ZeroPaddingaD(padding=kernel_size // 2  )
							lowercase__   					=			tf.keras.layers.ConvaD(
							    filters=__lowercase,   kernel_size=__lowercase,   strides=__lowercase,   padding="VALID",   groups=__lowercase,   use_bias=__lowercase,   name="convolution",   )
							lowercase__   					=			tf.keras.layers.BatchNormalization(epsilon=1e-5,   momentum=0.9,   name="normalization"  )
							lowercase__   					=			ACTaFN[activation] if activation is not None else tf.identity




				def 							A__ (  self   :  Optional[Any],   __lowercase   :  str  ):
							lowercase__   					=			self.convolution(self.padding(__lowercase  )  )
							lowercase__   					=			self.normalization(__lowercase  )
							lowercase__   					=			self.activation(__lowercase  )
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Union[str, Any],   __lowercase   :  RegNetConfig,   **__lowercase   :  Tuple  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			config.num_channels
							lowercase__   					=			TFRegNetConvLayer(
							    out_channels=config.embedding_size,   kernel_size=3,   stride=2,   activation=config.hidden_act,   name="embedder",   )




				def 							A__ (  self   :  List[str],   __lowercase   :  int  ):
							lowercase__   					=			shape_list(__lowercase  )[1]
							if tf.executing_eagerly() and num_channels != self.num_channels:
										raise ValueError(
										    "Make sure that the channel dimension of the pixel values match with the one set in the configuration."  )

							# When running on CPU, `tf.keras.layers.Conv2D` doesn't support `NCHW` format.
							# So change the input format from `NCHW` to `NHWC`.
							# shape = (batch_size, in_height, in_width, in_channels=num_channels)
							lowercase__   					=			tf.transpose(__lowercase,   perm=(0, 2, 3, 1)  )
							lowercase__   					=			self.embedder(__lowercase  )
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Optional[int],   __lowercase   :  int,   __lowercase   :  int = 2,   **__lowercase   :  Union[str, Any]  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			tf.keras.layers.ConvaD(
							    filters=__lowercase,   kernel_size=1,   strides=__lowercase,   use_bias=__lowercase,   name="convolution"  )
							lowercase__   					=			tf.keras.layers.BatchNormalization(epsilon=1e-5,   momentum=0.9,   name="normalization"  )




				def 							A__ (  self   :  List[str],   __lowercase   :  tf.Tensor,   __lowercase   :  bool = False  ):
							return self.normalization(self.convolution(__lowercase  ),   training=__lowercase  )
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Tuple,   __lowercase   :  int,   __lowercase   :  int,   **__lowercase   :  Optional[int]  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			tf.keras.layers.GlobalAveragePoolingaD(keepdims=__lowercase,   name="pooler"  )
							lowercase__   					=			[
							    tf.keras.layers.ConvaD(filters=__lowercase,   kernel_size=1,   activation="relu",   name="attention.0"  ),
							    tf.keras.layers.ConvaD(filters=__lowercase,   kernel_size=1,   activation="sigmoid",   name="attention.2"  ),
							]




				def 							A__ (  self   :  List[str],   __lowercase   :  List[str]  ):
							# [batch_size, h, w, num_channels] -> [batch_size, 1, 1, num_channels]
							lowercase__   					=			self.pooler(__lowercase  )
							for layer_module in self.attention:
										lowercase__   					=			layer_module(__lowercase  )
							lowercase__   					=			hidden_state * pooled
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Optional[int],   __lowercase   :  RegNetConfig,   __lowercase   :  int,   __lowercase   :  int,   __lowercase   :  int = 1,   **__lowercase   :  Union[str, Any]  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			in_channels != out_channels or stride != 1
							lowercase__   					=			max(1,   out_channels // config.groups_width  )
							lowercase__   					=			(
							    TFRegNetShortCut(__lowercase,   stride=__lowercase,   name="shortcut"  )
							    if should_apply_shortcut
							    else tf.keras.layers.Activation("linear",   name="shortcut"  )
							)
							# `self.layers` instead of `self.layer` because that is a reserved argument.
							lowercase__   					=			[
							    TFRegNetConvLayer(__lowercase,   kernel_size=1,   activation=config.hidden_act,   name="layer.0"  ),
							    TFRegNetConvLayer(
							        __lowercase,   stride=__lowercase,   groups=__lowercase,   activation=config.hidden_act,   name="layer.1"  ),
							    TFRegNetConvLayer(__lowercase,   kernel_size=1,   activation=__lowercase,   name="layer.2"  ),
							]
							lowercase__   					=			ACTaFN[config.hidden_act]




				def 							A__ (  self   :  str,   __lowercase   :  Tuple  ):
							lowercase__   					=			hidden_state
							for layer_module in self.layers:
										lowercase__   					=			layer_module(__lowercase  )
							lowercase__   					=			self.shortcut(__lowercase  )
							hidden_state += residual
							lowercase__   					=			self.activation(__lowercase  )
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  str,   __lowercase   :  RegNetConfig,   __lowercase   :  int,   __lowercase   :  int,   __lowercase   :  int = 1,   **__lowercase   :  Optional[Any]  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			in_channels != out_channels or stride != 1
							lowercase__   					=			max(1,   out_channels // config.groups_width  )
							lowercase__   					=			(
							    TFRegNetShortCut(__lowercase,   stride=__lowercase,   name="shortcut"  )
							    if should_apply_shortcut
							    else tf.keras.layers.Activation("linear",   name="shortcut"  )
							)
							lowercase__   					=			[
							    TFRegNetConvLayer(__lowercase,   kernel_size=1,   activation=config.hidden_act,   name="layer.0"  ),
							    TFRegNetConvLayer(
							        __lowercase,   stride=__lowercase,   groups=__lowercase,   activation=config.hidden_act,   name="layer.1"  ),
							    TFRegNetSELayer(__lowercase,   reduced_channels=int(round(in_channels / 4  )  ),   name="layer.2"  ),
							    TFRegNetConvLayer(__lowercase,   kernel_size=1,   activation=__lowercase,   name="layer.3"  ),
							]
							lowercase__   					=			ACTaFN[config.hidden_act]




				def 							A__ (  self   :  Any,   __lowercase   :  List[Any]  ):
							lowercase__   					=			hidden_state
							for layer_module in self.layers:
										lowercase__   					=			layer_module(__lowercase  )
							lowercase__   					=			self.shortcut(__lowercase  )
							hidden_state += residual
							lowercase__   					=			self.activation(__lowercase  )
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  List[str],   __lowercase   :  RegNetConfig,   __lowercase   :  int,   __lowercase   :  int,   __lowercase   :  int = 2,   __lowercase   :  int = 2,   **__lowercase   :  Optional[Any]  ):
							super().__init__(**__lowercase  )

							lowercase__   					=			TFRegNetXLayer if config.layer_type == "x" else TFRegNetYLayer
							lowercase__   					=			[
							    # downsampling is done in the first layer with stride of 2
							    layer(__lowercase,   __lowercase,   __lowercase,   stride=__lowercase,   name="layers.0"  ),
							    *[layer(__lowercase,   __lowercase,   __lowercase,   name=F'''layers.{i+1}'''  ) for i in range(depth - 1  )],
							]




				def 							A__ (  self   :  str,   __lowercase   :  Tuple  ):
							for layer_module in self.layers:
										lowercase__   					=			layer_module(__lowercase  )
							return hidden_state
class 			_snake_case     (   tf.keras.layers.Layer):




				def __init__(  self   :  Optional[int],   __lowercase   :  RegNetConfig,   **__lowercase   :  Union[str, Any]  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			[]
							# based on `downsample_in_first_stage`, the first layer of the first stage may or may not downsample the input
							self.stages.append(
							    TFRegNetStage(
							        __lowercase,   config.embedding_size,   config.hidden_sizes[0],   stride=2 if config.downsample_in_first_stage else 1,   depth=config.depths[0],   name="stages.0",   )  )
							lowercase__   					=			zip(config.hidden_sizes,   config.hidden_sizes[1:]  )
							for i, ((in_channels, out_channels), depth) in enumerate(zip(__lowercase,   config.depths[1:]  )  ):
										self.stages.append(TFRegNetStage(__lowercase,   __lowercase,   __lowercase,   depth=__lowercase,   name=F'''stages.{i+1}'''  )  )




				def 							A__ (  self   :  Optional[Any],   __lowercase   :  tf.Tensor,   __lowercase   :  bool = False,   __lowercase   :  bool = True  ):
							lowercase__   					=			() if output_hidden_states else None

							for stage_module in self.stages:
										if output_hidden_states:
													lowercase__   					=			hidden_states + (hidden_state,)

										lowercase__   					=			stage_module(__lowercase  )

							if output_hidden_states:
										lowercase__   					=			hidden_states + (hidden_state,)

							if not return_dict:
										return tuple(v for v in [hidden_state, hidden_states] if v is not None  )

							return TFBaseModelOutputWithNoAttention(last_hidden_state=__lowercase,   hidden_states=__lowercase  )
@keras_serializable
class 			_snake_case     (   tf.keras.layers.Layer):
				UpperCamelCase__			:   Optional[int]       						=RegNetConfig




				def __init__(  self   :  str,   __lowercase   :  Dict,   **__lowercase   :  str  ):
							super().__init__(**__lowercase  )
							lowercase__   					=			config
							lowercase__   					=			TFRegNetEmbeddings(__lowercase,   name="embedder"  )
							lowercase__   					=			TFRegNetEncoder(__lowercase,   name="encoder"  )
							lowercase__   					=			tf.keras.layers.GlobalAveragePoolingaD(keepdims=__lowercase,   name="pooler"  )




				@unpack_inputs
				def 							A__ (  self   :  Any,   __lowercase   :  tf.Tensor,   __lowercase   :  Optional[bool] = None,   __lowercase   :  Optional[bool] = None,   __lowercase   :  bool = False,   ):
							lowercase__   					=			(
							    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
							)
							lowercase__   					=			return_dict if return_dict is not None else self.config.use_return_dict

							lowercase__   					=			self.embedder(__lowercase,   training=__lowercase  )

							lowercase__   					=			self.encoder(
							    __lowercase,   output_hidden_states=__lowercase,   return_dict=__lowercase,   training=__lowercase  )

							lowercase__   					=			encoder_outputs[0]
							lowercase__   					=			self.pooler(__lowercase  )

							# Change to NCHW output format have uniformity in the modules
							lowercase__   					=			tf.transpose(__lowercase,   perm=(0, 3, 1, 2)  )
							lowercase__   					=			tf.transpose(__lowercase,   perm=(0, 3, 1, 2)  )

							# Change the other hidden state outputs to NCHW as well
							if output_hidden_states:
										lowercase__   					=			tuple([tf.transpose(__lowercase,   perm=(0, 3, 1, 2)  ) for h in encoder_outputs[1]]  )

							if not return_dict:
										return (last_hidden_state, pooled_output) + encoder_outputs[1:]

							return TFBaseModelOutputWithPoolingAndNoAttention(
							    last_hidden_state=__lowercase,   pooler_output=__lowercase,   hidden_states=hidden_states if output_hidden_states else encoder_outputs.hidden_states,   )
class 			_snake_case     (   lowercase__):
				UpperCamelCase__			:   List[str]       						=RegNetConfig
				UpperCamelCase__			:   Any       						="""regnet"""
				UpperCamelCase__			:   List[Any]       						="""pixel_values"""




				@property
				def 							A__ (  self   :  List[str]  ):
							return {"pixel_values": tf.TensorSpec(shape=(None, self.config.num_channels, 224, 224),   dtype=tf.floataa  )}
lowercase_						=       r"""
    Parameters:
    This model is a Tensorflow
    [tf.keras.layers.Layer](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer) sub-class. Use it as a
    regular Tensorflow Module and refer to the Tensorflow documentation for all matter related to general usage and
    behavior.
        config ([`RegNetConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~TFPreTrainedModel.from_pretrained`] method to load the model weights.
"""

lowercase_						=       r"""
    Args:
        pixel_values (`tf.Tensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`ConveNextImageProcessor.__call__`] for details.
        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""
@add_start_docstrings(
    """The bare RegNet model outputting raw features without any specific head on top."""      ,		lowercase__      ,		)
class 			_snake_case     (   lowercase__):




				def __init__(  self   :  str,   __lowercase   :  RegNetConfig,   *__lowercase   :  Dict,   **__lowercase   :  List[Any]  ):
							super().__init__(__lowercase,   *__lowercase,   **__lowercase  )
							lowercase__   					=			TFRegNetMainLayer(__lowercase,   name="regnet"  )




				@unpack_inputs
				@add_start_docstrings_to_model_forward(__lowercase  )
				@add_code_sample_docstrings(
				    checkpoint=_CHECKPOINT_FOR_DOC,   output_type=__lowercase,   config_class=_CONFIG_FOR_DOC,   modality="vision",   expected_output=_EXPECTED_OUTPUT_SHAPE,   )
				def 							A__ (  self   :  Union[str, Any],   __lowercase   :  tf.Tensor,   __lowercase   :  Optional[bool] = None,   __lowercase   :  Optional[bool] = None,   __lowercase   :  List[str]=False,   ):
							lowercase__   					=			(
							    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
							)
							lowercase__   					=			return_dict if return_dict is not None else self.config.use_return_dict

							lowercase__   					=			self.regnet(
							    pixel_values=__lowercase,   output_hidden_states=__lowercase,   return_dict=__lowercase,   training=__lowercase,   )
							if not return_dict:
										return (outputs[0],) + outputs[1:]

							return TFBaseModelOutputWithPoolingAndNoAttention(
							    last_hidden_state=outputs.last_hidden_state,   pooler_output=outputs.pooler_output,   hidden_states=outputs.hidden_states,   )
@add_start_docstrings(
    """
    RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for
    ImageNet.
    """      ,		lowercase__      ,		)
class 			_snake_case     (   lowercase__      ,		lowercase__):




				def __init__(  self   :  Any,   __lowercase   :  RegNetConfig,   *__lowercase   :  int,   **__lowercase   :  Optional[int]  ):
							super().__init__(__lowercase,   *__lowercase,   **__lowercase  )
							lowercase__   					=			config.num_labels
							lowercase__   					=			TFRegNetMainLayer(__lowercase,   name="regnet"  )
							# classification head
							lowercase__   					=			[
							    tf.keras.layers.Flatten(),
							    tf.keras.layers.Dense(config.num_labels,   name="classifier.1"  ) if config.num_labels > 0 else tf.identity,
							]




				@unpack_inputs
				@add_start_docstrings_to_model_forward(__lowercase  )
				@add_code_sample_docstrings(
				    checkpoint=_IMAGE_CLASS_CHECKPOINT,   output_type=__lowercase,   config_class=_CONFIG_FOR_DOC,   expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT,   )
				def 							A__ (  self   :  Union[str, Any],   __lowercase   :  tf.Tensor = None,   __lowercase   :  tf.Tensor = None,   __lowercase   :  bool = None,   __lowercase   :  bool = None,   __lowercase   :  Dict=False,   ):
							lowercase__   					=			(
							    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
							)
							lowercase__   					=			return_dict if return_dict is not None else self.config.use_return_dict

							lowercase__   					=			self.regnet(
							    __lowercase,   output_hidden_states=__lowercase,   return_dict=__lowercase,   training=__lowercase  )

							lowercase__   					=			outputs.pooler_output if return_dict else outputs[1]

							lowercase__   					=			self.classifier[0](__lowercase  )
							lowercase__   					=			self.classifier[1](__lowercase  )

							lowercase__   					=			None if labels is None else self.hf_compute_loss(labels=__lowercase,   logits=__lowercase  )

							if not return_dict:
										lowercase__   					=			(logits,) + outputs[2:]
										return ((loss,) + output) if loss is not None else output

							return TFSequenceClassifierOutput(loss=__lowercase,   logits=__lowercase,   hidden_states=outputs.hidden_states  )









from collections import OrderedDict
from typing import Any, Mapping, Optional, Union

from ...configuration_utils import PretrainedConfig
from ...feature_extraction_utils import FeatureExtractionMixin
from ...onnx import OnnxConfig
from ...onnx.utils import compute_effective_axis_dimension
from ...tokenization_utils_base import PreTrainedTokenizerBase
from ...utils import TensorType, logging


lowercase_						=       logging.get_logger(__name__)

lowercase_						=       {
    """deepmind/language-perceiver""": """https://huggingface.co/deepmind/language-perceiver/resolve/main/config.json""",
    # See all Perceiver models at https://huggingface.co/models?filter=perceiver
}
class 			_snake_case     (   lowercase__):
				UpperCamelCase__			:   Any       						="""perceiver"""




				def __init__(  self   :  Any,   __lowercase   :  Optional[Any]=256,   __lowercase   :  List[str]=1280,   __lowercase   :  Dict=768,   __lowercase   :  int=1,   __lowercase   :  Dict=26,   __lowercase   :  Any=8,   __lowercase   :  List[Any]=8,   __lowercase   :  Dict=None,   __lowercase   :  List[Any]=None,   __lowercase   :  str="kv",   __lowercase   :  str=1,   __lowercase   :  Optional[Any]=1,   __lowercase   :  str="gelu",   __lowercase   :  List[str]=0.1,   __lowercase   :  int=0.02,   __lowercase   :  Union[str, Any]=1e-1_2,   __lowercase   :  Optional[Any]=True,   __lowercase   :  Optional[Any]=262,   __lowercase   :  str=2048,   __lowercase   :  Optional[Any]=56,   __lowercase   :  str=[368, 496],   __lowercase   :  str=16,   __lowercase   :  int=1920,   __lowercase   :  Dict=16,   __lowercase   :  List[Any]=[1, 16, 224, 224],   **__lowercase   :  str,   ):
							super().__init__(**__lowercase  )

							lowercase__   					=			num_latents
							lowercase__   					=			d_latents
							lowercase__   					=			d_model
							lowercase__   					=			num_blocks
							lowercase__   					=			num_self_attends_per_block
							lowercase__   					=			num_self_attention_heads
							lowercase__   					=			num_cross_attention_heads
							lowercase__   					=			qk_channels
							lowercase__   					=			v_channels
							lowercase__   					=			cross_attention_shape_for_attention
							lowercase__   					=			self_attention_widening_factor
							lowercase__   					=			cross_attention_widening_factor
							lowercase__   					=			hidden_act
							lowercase__   					=			attention_probs_dropout_prob
							lowercase__   					=			initializer_range
							lowercase__   					=			layer_norm_eps
							lowercase__   					=			use_query_residual
							# masked language modeling attributes
							lowercase__   					=			vocab_size
							lowercase__   					=			max_position_embeddings
							# image classification attributes
							lowercase__   					=			image_size
							# flow attributes
							lowercase__   					=			train_size
							# multimodal autoencoding attributes
							lowercase__   					=			num_frames
							lowercase__   					=			audio_samples_per_frame
							lowercase__   					=			samples_per_patch
							lowercase__   					=			output_shape
class 			_snake_case     (   lowercase__):




				@property
				def 							A__ (  self   :  Optional[int]  ):
							if self.task == "multiple-choice":
										lowercase__   					=			{0: "batch", 1: "choice", 2: "sequence"}
							else:
										lowercase__   					=			{0: "batch", 1: "sequence"}
							return OrderedDict(
							    [
							        ("inputs", dynamic_axis),
							        ("attention_mask", dynamic_axis),
							    ]  )




				@property
				def 							A__ (  self   :  Optional[Any]  ):
							return 1e-4




				def 							A__ (  self   :  Tuple,   __lowercase   :  Union["PreTrainedTokenizerBase", "FeatureExtractionMixin"],   __lowercase   :  int = -1,   __lowercase   :  int = -1,   __lowercase   :  int = -1,   __lowercase   :  bool = False,   __lowercase   :  Optional[TensorType] = None,   __lowercase   :  int = 3,   __lowercase   :  int = 40,   __lowercase   :  int = 40,   ):
							# copied from `transformers.onnx.config.OnnxConfig` and slightly altered/simplified

							if isinstance(__lowercase,   __lowercase  ):
										# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
										lowercase__   					=			compute_effective_axis_dimension(
										    __lowercase,   fixed_dimension=OnnxConfig.default_fixed_batch,   num_token_to_add=0  )
										# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
										lowercase__   					=			preprocessor.num_special_tokens_to_add(__lowercase  )
										lowercase__   					=			compute_effective_axis_dimension(
										    __lowercase,   fixed_dimension=OnnxConfig.default_fixed_sequence,   num_token_to_add=__lowercase  )
										# Generate dummy inputs according to compute batch and sequence
										lowercase__   					=			[" ".join(["a"]  ) * seq_length] * batch_size
										lowercase__   					=			dict(preprocessor(__lowercase,   return_tensors=__lowercase  )  )
										lowercase__   					=			inputs.pop("input_ids"  )
										return inputs
							elif isinstance(__lowercase,   __lowercase  ) and preprocessor.model_input_names[0] == "pixel_values":
										# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
										lowercase__   					=			compute_effective_axis_dimension(__lowercase,   fixed_dimension=OnnxConfig.default_fixed_batch  )
										lowercase__   					=			self._generate_dummy_images(__lowercase,   __lowercase,   __lowercase,   __lowercase  )
										lowercase__   					=			dict(preprocessor(images=__lowercase,   return_tensors=__lowercase  )  )
										lowercase__   					=			inputs.pop("pixel_values"  )
										return inputs
							else:
										raise ValueError(
										    "Unable to generate dummy inputs for the model. Please provide a tokenizer or a preprocessor."  )




