

from typing import Optional, Union

import torch
from torch import nn
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss

from ...activations import ACTaFN
from ...modeling_outputs import BaseModelOutputWithPoolingAndNoAttention, ImageClassifierOutputWithNoAttention
from ...modeling_utils import PreTrainedModel
from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
from .configuration_mobilenet_va import MobileNetVaConfig


SCREAMING_SNAKE_CASE_            = logging.get_logger(__name__)


# General docstring
SCREAMING_SNAKE_CASE_            = 'MobileNetV1Config'

# Base docstring
SCREAMING_SNAKE_CASE_            = 'google/mobilenet_v1_1.0_224'
SCREAMING_SNAKE_CASE_            = [1, 1024, 7, 7]

# Image classification docstring
SCREAMING_SNAKE_CASE_            = 'google/mobilenet_v1_1.0_224'
SCREAMING_SNAKE_CASE_            = 'tabby, tabby cat'


SCREAMING_SNAKE_CASE_            = [
    'google/mobilenet_v1_1.0_224',
    'google/mobilenet_v1_0.75_192',
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
]

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					Any					, lowerCAmelCase:					List[str]					, lowerCAmelCase:					Any=None	)				->    Tuple:
				_UpperCAmelCase    :						Tuple							=      {}

				if isinstance(lowerCAmelCase					, lowerCAmelCase	):
								_UpperCAmelCase    :						Dict							=      model.mobilenet_va
				else:
								_UpperCAmelCase    :						str							=      model

				_UpperCAmelCase    :						int							=      '''MobilenetV1/Conv2d_0/'''
				_UpperCAmelCase    :						str							=      backbone.conv_stem.convolution.weight
				_UpperCAmelCase    :						int							=      backbone.conv_stem.normalization.bias
				_UpperCAmelCase    :						Union[str, Any]							=      backbone.conv_stem.normalization.weight
				_UpperCAmelCase    :						Optional[int]							=      backbone.conv_stem.normalization.running_mean
				_UpperCAmelCase    :						Optional[int]							=      backbone.conv_stem.normalization.running_var

				for i in range(13	):
								_UpperCAmelCase    :						Optional[Any]							=      i + 1
								_UpperCAmelCase    :						Optional[int]							=      i * 2

								_UpperCAmelCase    :						List[Any]							=      backbone.layer[pt_index]
								_UpperCAmelCase    :						Tuple							=      F'MobilenetV1/Conv2d_{tf_index}_depthwise/'
								_UpperCAmelCase    :						Any							=      pointer.convolution.weight
								_UpperCAmelCase    :						Dict							=      pointer.normalization.bias
								_UpperCAmelCase    :						List[str]							=      pointer.normalization.weight
								_UpperCAmelCase    :						Any							=      pointer.normalization.running_mean
								_UpperCAmelCase    :						List[str]							=      pointer.normalization.running_var

								_UpperCAmelCase    :						Union[str, Any]							=      backbone.layer[pt_index + 1]
								_UpperCAmelCase    :						List[str]							=      F'MobilenetV1/Conv2d_{tf_index}_pointwise/'
								_UpperCAmelCase    :						Optional[Any]							=      pointer.convolution.weight
								_UpperCAmelCase    :						Dict							=      pointer.normalization.bias
								_UpperCAmelCase    :						int							=      pointer.normalization.weight
								_UpperCAmelCase    :						Optional[int]							=      pointer.normalization.running_mean
								_UpperCAmelCase    :						Optional[int]							=      pointer.normalization.running_var

				if isinstance(lowerCAmelCase					, lowerCAmelCase	):
								_UpperCAmelCase    :						Any							=      '''MobilenetV1/Logits/Conv2d_1c_1x1/'''
								_UpperCAmelCase    :						Union[str, Any]							=      model.classifier.weight
								_UpperCAmelCase    :						int							=      model.classifier.bias

				return tf_to_pt_map

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					Dict					, lowerCAmelCase:					Tuple					, lowerCAmelCase:					int	)				->    Tuple:







				try:
								import numpy as np
								import tensorflow as tf
				except ImportError:
								logger.error(
								    "Loading a TensorFlow models in PyTorch, requires TensorFlow to be installed. Please see "
								    "https://www.tensorflow.org/install/ for installation instructions."	)
								raise

				# Load weights from TF model
				_UpperCAmelCase    :						Any							=      tf.train.list_variables(lowerCAmelCase	)
				_UpperCAmelCase    :						List[str]							=      {}
				for name, shape in init_vars:
								logger.info(F'Loading TF weight {name} with shape {shape}'	)
								_UpperCAmelCase    :						str							=      tf.train.load_variable(lowerCAmelCase					, lowerCAmelCase	)
								_UpperCAmelCase    :						List[str]							=      array

				# Build TF to PyTorch weights loading map
				_UpperCAmelCase    :						Optional[Any]							=      _build_tf_to_pytorch_map(lowerCAmelCase					, lowerCAmelCase					, lowerCAmelCase	)

				for name, pointer in tf_to_pt_map.items():
								logger.info(F'Importing {name}'	)
								if name not in tf_weights:
												logger.info(F'{name} not in tf pre-trained weights, skipping'	)
												continue

								_UpperCAmelCase    :						Optional[Any]							=      tf_weights[name]

								if "depthwise_weights" in name:
												logger.info("Transposing depthwise"	)
												_UpperCAmelCase    :						Optional[int]							=      np.transpose(lowerCAmelCase					, (2, 3, 0, 1)	)
								elif "weights" in name:
												logger.info("Transposing"	)
												if len(pointer.shape	) == 2:  # copying into linear layer
																_UpperCAmelCase    :						Tuple							=      array.squeeze().transpose()
												else:
																_UpperCAmelCase    :						Union[str, Any]							=      np.transpose(lowerCAmelCase					, (3, 2, 0, 1)	)

								if pointer.shape != array.shape:
												raise ValueError(F'Pointer shape {pointer.shape} and array shape {array.shape} mismatched'	)

								logger.info(F'Initialize PyTorch weight {name} {array.shape}'	)
								_UpperCAmelCase    :						Optional[int]							=      torch.from_numpy(lowerCAmelCase	)

								tf_weights.pop(lowerCAmelCase					, lowerCAmelCase	)
								tf_weights.pop(name + "/RMSProp"					, lowerCAmelCase	)
								tf_weights.pop(name + "/RMSProp_1"					, lowerCAmelCase	)
								tf_weights.pop(name + "/ExponentialMovingAverage"					, lowerCAmelCase	)

				logger.info(F'Weights not copied to PyTorch model: {", ".join(tf_weights.keys()	)}'	)
				return model

def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					Tuple					, lowerCAmelCase:					List[str]	)				->    Optional[Any]:
				_UpperCAmelCase    :						str							=      features.shape[-2:]
				_UpperCAmelCase    :						Union[str, Any]							=      conv_layer.stride
				_UpperCAmelCase    :						Union[str, Any]							=      conv_layer.kernel_size

				if in_height % stride_height == 0:
								_UpperCAmelCase    :						Optional[int]							=      max(kernel_height - stride_height					, 0	)
				else:
								_UpperCAmelCase    :						List[Any]							=      max(kernel_height - (in_height % stride_height)					, 0	)

				if in_width % stride_width == 0:
								_UpperCAmelCase    :						List[str]							=      max(kernel_width - stride_width					, 0	)
				else:
								_UpperCAmelCase    :						Tuple							=      max(kernel_width - (in_width % stride_width)					, 0	)

				_UpperCAmelCase    :						Any							=      pad_along_width // 2
				_UpperCAmelCase    :						Tuple							=      pad_along_width - pad_left
				_UpperCAmelCase    :						Union[str, Any]							=      pad_along_height // 2
				_UpperCAmelCase    :						str							=      pad_along_height - pad_top

				_UpperCAmelCase    :						Optional[Any]							=      (pad_left, pad_right, pad_top, pad_bottom)
				return nn.functional.pad(lowerCAmelCase					, lowerCAmelCase					, "constant"					, 0.0	)

class 			a					(		nn.Module			):


						def __init__(    self  ,   A_  ,   A_  ,   A_  ,   A_  ,   A_ = 1  ,   A_ = 1  ,   A_ = False  ,   A_ = True  ,   A_ = True  ,   ):







										'''simple docstring'''


										super().__init__()
										_UpperCAmelCase    :						str							=      config

										if in_channels % groups != 0:
														raise ValueError(f'Input channels ({in_channels}) are not divisible by {groups} groups.'		)
										if out_channels % groups != 0:
														raise ValueError(f'Output channels ({out_channels}) are not divisible by {groups} groups.'		)

										_UpperCAmelCase    :						Any							=      0 if config.tf_padding else int((kernel_size - 1) / 2		)

										_UpperCAmelCase    :						List[Any]							=      nn.Convad(
										    in_channels=__lowercase  ,   out_channels=__lowercase  ,   kernel_size=__lowercase  ,   stride=__lowercase  ,   padding=__lowercase  ,   groups=__lowercase  ,   bias=__lowercase  ,   padding_mode="zeros"  ,   )

										if use_normalization:
														_UpperCAmelCase    :						str							=      nn.BatchNormad(
														    num_features=__lowercase  ,   eps=config.layer_norm_eps  ,   momentum=0.99_97  ,   affine=__lowercase  ,   track_running_stats=__lowercase  ,   )
										else:
														_UpperCAmelCase    :						Tuple							=      None

										if use_activation:
														if isinstance(__lowercase  ,   __lowercase		):
																		_UpperCAmelCase    :						Union[str, Any]							=      ACTaFN[use_activation]
														elif isinstance(config.hidden_act  ,   __lowercase		):
																		_UpperCAmelCase    :						Dict							=      ACTaFN[config.hidden_act]
														else:
																		_UpperCAmelCase    :						List[Any]							=      config.hidden_act
										else:
														_UpperCAmelCase    :						Optional[Any]							=      None





						def     _UpperCAmelCase			(    self  ,   A_		):







										'''simple docstring'''


										if self.config.tf_padding:
														_UpperCAmelCase    :						Any							=      apply_tf_padding(__lowercase  ,   self.convolution		)
										_UpperCAmelCase    :						str							=      self.convolution(__lowercase		)
										if self.normalization is not None:
														_UpperCAmelCase    :						Any							=      self.normalization(__lowercase		)
										if self.activation is not None:
														_UpperCAmelCase    :						List[str]							=      self.activation(__lowercase		)
										return features







class 			a					(		UpperCAmelCase_			):
						_lowercase        =     MobileNetVaConfig
						_lowercase        =     load_tf_weights_in_mobilenet_va
						_lowercase        =     """mobilenet_v1"""
						_lowercase        =     """pixel_values"""
						_lowercase        =     False


						def     _UpperCAmelCase			(    self  ,   A_		):







										'''simple docstring'''


										if isinstance(__lowercase  ,   (nn.Linear, nn.Convad)		):
														module.weight.data.normal_(mean=0.0  ,   std=self.config.initializer_range		)
														if module.bias is not None:
																		module.bias.data.zero_()
										elif isinstance(__lowercase  ,   nn.BatchNormad		):
														module.bias.data.zero_()
														module.weight.data.fill_(1.0		)







SCREAMING_SNAKE_CASE_            = R'\n    This model is a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it\n    as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and\n    behavior.\n\n    Parameters:\n        config ([`MobileNetV1Config`]): Model configuration class with all the parameters of the model.\n            Initializing with a config file does not load the weights associated with the model, only the\n            configuration. Check out the [`~PreTrainedModel.from_pretrained`] method to load the model weights.\n'

SCREAMING_SNAKE_CASE_            = R'\n    Args:\n        pixel_values (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)`):\n            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See\n            [`MobileNetV1ImageProcessor.__call__`] for details.\n        output_hidden_states (`bool`, *optional*):\n            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for\n            more detail.\n        return_dict (`bool`, *optional*):\n            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.\n'

@add_start_docstrings(
    "The bare MobileNetV1 model outputting raw hidden-states without any specific head on top."							,	UpperCAmelCase_							,	)
class 			a					(		UpperCAmelCase_			):


						def __init__(    self  ,   A_  ,   A_ = True		):







										'''simple docstring'''


										super().__init__(__lowercase		)
										_UpperCAmelCase    :						List[str]							=      config

										_UpperCAmelCase    :						Any							=      32
										_UpperCAmelCase    :						List[str]							=      max(int(depth * config.depth_multiplier		)  ,   config.min_depth		)

										_UpperCAmelCase    :						Union[str, Any]							=      MobileNetVaConvLayer(
										    __lowercase  ,   in_channels=config.num_channels  ,   out_channels=__lowercase  ,   kernel_size=3  ,   stride=2  ,   )

										_UpperCAmelCase    :						str							=      [1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1]

										_UpperCAmelCase    :						Any							=      nn.ModuleList()
										for i in range(13		):
														_UpperCAmelCase    :						str							=      out_channels

														if strides[i] == 2 or i == 0:
																		depth *= 2
																		_UpperCAmelCase    :						Tuple							=      max(int(depth * config.depth_multiplier		)  ,   config.min_depth		)

														self.layer.append(
														    MobileNetVaConvLayer(
														        __lowercase  ,   in_channels=__lowercase  ,   out_channels=__lowercase  ,   kernel_size=3  ,   stride=strides[i]  ,   groups=__lowercase  ,   )		)

														self.layer.append(
														    MobileNetVaConvLayer(
														        __lowercase  ,   in_channels=__lowercase  ,   out_channels=__lowercase  ,   kernel_size=1  ,   )		)

										_UpperCAmelCase    :						str							=      nn.AdaptiveAvgPoolad((1, 1)		) if add_pooling_layer else None

										# Initialize weights and apply final processing
										self.post_init()


						def     _UpperCAmelCase			(    self  ,   A_		):







										'''simple docstring'''


										raise NotImplementedError





						@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     _UpperCAmelCase			(    self  ,   A_ = None  ,   A_ = None  ,   A_ = None  ,   ):







										'''simple docstring'''


										_UpperCAmelCase    :						Union[str, Any]							=      (
										    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
										)
										_UpperCAmelCase    :						str							=      return_dict if return_dict is not None else self.config.use_return_dict

										if pixel_values is None:
														raise ValueError("You have to specify pixel_values"		)

										_UpperCAmelCase    :						int							=      self.conv_stem(__lowercase		)

										_UpperCAmelCase    :						List[str]							=      () if output_hidden_states else None

										for i, layer_module in enumerate(self.layer		):
														_UpperCAmelCase    :						Optional[Any]							=      layer_module(__lowercase		)

														if output_hidden_states:
																		_UpperCAmelCase    :						int							=      all_hidden_states + (hidden_states,)

										_UpperCAmelCase    :						Any							=      hidden_states

										if self.pooler is not None:
														_UpperCAmelCase    :						str							=      torch.flatten(self.pooler(__lowercase		)  ,   start_dim=1		)
										else:
														_UpperCAmelCase    :						Tuple							=      None

										if not return_dict:
														return tuple(v for v in [last_hidden_state, pooled_output, all_hidden_states] if v is not None		)

										return BaseModelOutputWithPoolingAndNoAttention(
										    last_hidden_state=__lowercase  ,   pooler_output=__lowercase  ,   hidden_states=__lowercase  ,   )







@add_start_docstrings(
    "\n    MobileNetV1 model with an image classification head on top (a linear layer on top of the pooled features), e.g. for\n    ImageNet.\n    "							,	UpperCAmelCase_							,	)
class 			a					(		UpperCAmelCase_			):


						def __init__(    self  ,   A_		):







										'''simple docstring'''


										super().__init__(__lowercase		)

										_UpperCAmelCase    :						int							=      config.num_labels
										_UpperCAmelCase    :						Optional[int]							=      MobileNetVaModel(__lowercase		)

										_UpperCAmelCase    :						Optional[Any]							=      self.mobilenet_va.layer[-1].convolution.out_channels

										# Classifier head
										_UpperCAmelCase    :						str							=      nn.Dropout(config.classifier_dropout_prob  ,   inplace=__lowercase		)
										_UpperCAmelCase    :						Dict							=      nn.Linear(__lowercase  ,   config.num_labels		) if config.num_labels > 0 else nn.Identity()

										# Initialize weights and apply final processing
										self.post_init()





						@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     _UpperCAmelCase			(    self  ,   A_ = None  ,   A_ = None  ,   A_ = None  ,   A_ = None  ,   ):







										'''simple docstring'''


										_UpperCAmelCase    :						List[Any]							=      return_dict if return_dict is not None else self.config.use_return_dict

										_UpperCAmelCase    :						Tuple							=      self.mobilenet_va(__lowercase  ,   output_hidden_states=__lowercase  ,   return_dict=__lowercase		)

										_UpperCAmelCase    :						List[str]							=      outputs.pooler_output if return_dict else outputs[1]

										_UpperCAmelCase    :						Union[str, Any]							=      self.classifier(self.dropout(__lowercase		)		)

										_UpperCAmelCase    :						int							=      None
										if labels is not None:
														if self.config.problem_type is None:
																		if self.num_labels == 1:
																						_UpperCAmelCase    :						Tuple							=      '''regression'''
																		elif self.num_labels > 1 and (labels.dtype == torch.long or labels.dtype == torch.int):
																						_UpperCAmelCase    :						Union[str, Any]							=      '''single_label_classification'''
																		else:
																						_UpperCAmelCase    :						Optional[Any]							=      '''multi_label_classification'''

														if self.config.problem_type == "regression":
																		_UpperCAmelCase    :						Any							=      MSELoss()
																		if self.num_labels == 1:
																						_UpperCAmelCase    :						List[str]							=      loss_fct(logits.squeeze()  ,   labels.squeeze()		)
																		else:
																						_UpperCAmelCase    :						Dict							=      loss_fct(__lowercase  ,   __lowercase		)
														elif self.config.problem_type == "single_label_classification":
																		_UpperCAmelCase    :						Optional[int]							=      CrossEntropyLoss()
																		_UpperCAmelCase    :						str							=      loss_fct(logits.view(-1  ,   self.num_labels		)  ,   labels.view(-1		)		)
														elif self.config.problem_type == "multi_label_classification":
																		_UpperCAmelCase    :						Dict							=      BCEWithLogitsLoss()
																		_UpperCAmelCase    :						List[str]							=      loss_fct(__lowercase  ,   __lowercase		)

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

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





import shutil
import tempfile
import unittest

import numpy as np
import pytest

from transformers import is_speech_available, is_vision_available
from transformers.testing_utils import require_torch


if is_vision_available():
					from transformers import TvltImageProcessor

if is_speech_available():
					from transformers import TvltFeatureExtractor

from transformers import TvltProcessor

@require_torch
class 			a					(		unittest.TestCase			):


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						int							=      "ZinengTang/tvlt-base"
										_UpperCAmelCase    :						int							=      tempfile.mkdtemp()


						def     _UpperCAmelCase			(    self  ,   **A_		):







										'''simple docstring'''


										return TvltImageProcessor.from_pretrained(self.checkpoint  ,   **A_		)


						def     _UpperCAmelCase			(    self  ,   **A_		):







										'''simple docstring'''


										return TvltFeatureExtractor.from_pretrained(self.checkpoint  ,   **A_		)


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										shutil.rmtree(self.tmpdirname		)


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						Dict							=      self.get_image_processor()
										_UpperCAmelCase    :						Optional[int]							=      self.get_feature_extractor()

										_UpperCAmelCase    :						Tuple							=      TvltProcessor(image_processor=A_  ,   feature_extractor=A_		)
										processor.save_pretrained(self.tmpdirname		)
										_UpperCAmelCase    :						str							=      TvltProcessor.from_pretrained(self.tmpdirname		)

										self.assertIsInstance(processor.feature_extractor  ,   A_		)
										self.assertIsInstance(processor.image_processor  ,   A_		)


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						List[Any]							=      self.get_image_processor()
										_UpperCAmelCase    :						int							=      self.get_feature_extractor()

										_UpperCAmelCase    :						Tuple							=      TvltProcessor(image_processor=A_  ,   feature_extractor=A_		)

										_UpperCAmelCase    :						List[str]							=      np.ones([12000]		)

										_UpperCAmelCase    :						int							=      feature_extractor(A_  ,   return_tensors="np"		)
										_UpperCAmelCase    :						int							=      processor(audio=A_  ,   return_tensors="np"		)

										for key in audio_dict.keys():
														self.assertAlmostEqual(audio_dict[key].sum()  ,   input_processor[key].sum()  ,   delta=1e-2		)


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						List[str]							=      self.get_image_processor()
										_UpperCAmelCase    :						int							=      self.get_feature_extractor()

										_UpperCAmelCase    :						Optional[Any]							=      TvltProcessor(image_processor=A_  ,   feature_extractor=A_		)

										_UpperCAmelCase    :						Union[str, Any]							=      np.ones([3, 224, 224]		)

										_UpperCAmelCase    :						Tuple							=      image_processor(A_  ,   return_tensors="np"		)
										_UpperCAmelCase    :						List[str]							=      processor(images=A_  ,   return_tensors="np"		)

										for key in image_dict.keys():
														self.assertAlmostEqual(image_dict[key].sum()  ,   input_processor[key].sum()  ,   delta=1e-2		)


						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						List[str]							=      self.get_image_processor()
										_UpperCAmelCase    :						Any							=      self.get_feature_extractor()

										_UpperCAmelCase    :						Dict							=      TvltProcessor(image_processor=A_  ,   feature_extractor=A_		)

										_UpperCAmelCase    :						str							=      np.ones([12000]		)
										_UpperCAmelCase    :						Optional[Any]							=      np.ones([3, 224, 224]		)

										_UpperCAmelCase    :						List[Any]							=      processor(audio=A_  ,   images=A_		)

										self.assertListEqual(list(inputs.keys()		)  ,   ["audio_values", "audio_mask", "pixel_values", "pixel_mask"]		)

										# test if it raises when no input is passed
										with pytest.raises(A_		):
														processor()





						def     _UpperCAmelCase			(    self		):







										'''simple docstring'''


										_UpperCAmelCase    :						Optional[Any]							=      self.get_image_processor()
										_UpperCAmelCase    :						int							=      self.get_feature_extractor()

										_UpperCAmelCase    :						str							=      TvltProcessor(image_processor=A_  ,   feature_extractor=A_		)

										self.assertListEqual(
										    processor.model_input_names  ,   image_processor.model_input_names + feature_extractor.model_input_names  ,   msg="`processor` and `image_processor`+`feature_extractor` model input names do not match"  ,   )


