




'''simple docstring'''


import copy
import inspect
import unittest

from transformers import PretrainedConfig, SwiftFormerConfig
from transformers.testing_utils import (
    require_torch,
    require_vision,
    slow,
    torch_device,
)
from transformers.utils import cached_property, is_torch_available, is_vision_available

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


if is_torch_available():
				import torch
				from torch import nn

				from transformers import SwiftFormerForImageClassification, SwiftFormerModel
				from transformers.models.swiftformer.modeling_swiftformer import SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
				from PIL import Image

				from transformers import ViTImageProcessor

class     A					:







							def __init__(						self :						Dict							,    lowerCAmelCase_ :						int							,    lowerCAmelCase_ :						int=13							,    lowerCAmelCase_ :						List[str]=3							,    lowerCAmelCase_ :						Any=True							,    lowerCAmelCase_ :						Union[str, Any]=True							,    lowerCAmelCase_ :						Any=0.1							,    lowerCAmelCase_ :						Optional[int]=0.1							,    lowerCAmelCase_ :						List[Any]=2_24							,    lowerCAmelCase_ :						Any=10_00							,    lowerCAmelCase_ :						Tuple=[3, 3, 6, 4]							,    lowerCAmelCase_ :						Union[str, Any]=[48, 56, 1_12, 2_20]							,    )    ->							List[Any]:


														"""simple docstring"""


														_a			  =       parent
														_a			  =       batch_size
														_a			  =       num_channels
														_a			  =       is_training
														_a			  =       use_labels
														_a			  =       hidden_dropout_prob
														_a			  =       attention_probs_dropout_prob
														_a			  =       num_labels
														_a			  =       image_size
														_a			  =       layer_depths
														_a			  =       embed_dims







							def      __lowerCAmelCase    (						self :						Union[str, Any]      )    ->							Any:


														"""simple docstring"""


														_a			  =       floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]      )

														_a			  =       None
														if self.use_labels:
																					_a			  =       ids_tensor([self.batch_size]							,    self.num_labels      )

														_a			  =       self.get_config()

														return config, pixel_values, labels







							def      __lowerCAmelCase    (						self :						Optional[int]      )    ->							Tuple:


														"""simple docstring"""


														return SwiftFormerConfig(
														    depths=self.layer_depths							,    embed_dims=self.embed_dims							,    mlp_ratio=4							,    downsamples=[True, True, True, True]							,    hidden_act='''gelu'''							,    num_labels=self.num_labels							,    down_patch_size=3							,    down_stride=2							,    down_pad=1							,    drop_rate=0.0							,    drop_path_rate=0.0							,    use_layer_scale=lowerCAmelCase_							,    layer_scale_init_value=1e-5							,    )







							def      __lowerCAmelCase    (						self :						int							,    lowerCAmelCase_ :						Tuple							,    lowerCAmelCase_ :						List[str]							,    lowerCAmelCase_ :						Union[str, Any]      )    ->							Union[str, Any]:


														"""simple docstring"""


														_a			  =       SwiftFormerModel(config=lowerCAmelCase_      )
														model.to(lowerCAmelCase_      )
														model.eval()
														_a			  =       model(lowerCAmelCase_      )
														self.parent.assertEqual(result.last_hidden_state.shape							,    (self.batch_size, self.embed_dims[-1], 7, 7)      )







							def      __lowerCAmelCase    (						self :						Any							,    lowerCAmelCase_ :						List[str]							,    lowerCAmelCase_ :						List[str]							,    lowerCAmelCase_ :						Optional[Any]      )    ->							List[str]:


														"""simple docstring"""


														_a			  =       self.num_labels
														_a			  =       SwiftFormerForImageClassification(lowerCAmelCase_      )
														model.to(lowerCAmelCase_      )
														model.eval()
														_a			  =       model(lowerCAmelCase_							,    labels=lowerCAmelCase_      )
														self.parent.assertEqual(result.logits.shape							,    (self.batch_size, self.num_labels)      )

														_a			  =       SwiftFormerForImageClassification(lowerCAmelCase_      )
														model.to(lowerCAmelCase_      )
														model.eval()

														_a			  =       floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]      )
														_a			  =       model(lowerCAmelCase_      )
														self.parent.assertEqual(result.logits.shape							,    (self.batch_size, self.num_labels)      )







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


														"""simple docstring"""


														((_a)  ,							(_a)  ,							(_a))			  =       self.prepare_config_and_inputs()
														_a			  =       {'''pixel_values''': pixel_values}
														return config, inputs_dict



@require_torch
class     A					(	_a  ,_a  ,unittest.TestCase					):
							lowercase_           =       (SwiftFormerModel, SwiftFormerForImageClassification) if is_torch_available() else ()
							lowercase_           =       (
							    {'feature-extraction': SwiftFormerModel, 'image-classification': SwiftFormerForImageClassification}
							    if is_torch_available()
							    else {}
							)

							lowercase_           =       False
							lowercase_           =       False
							lowercase_           =       False
							lowercase_           =       False
							lowercase_           =       False







							def      __lowerCAmelCase    (						self :						List[str]      )    ->							Union[str, Any]:


														"""simple docstring"""


														_a			  =       SwiftFormerModelTester(self      )
														_a			  =       ConfigTester(
														    self							,    config_class=lowerCAmelCase_							,    has_text_modality=lowerCAmelCase_							,    hidden_size=37							,    num_attention_heads=12							,    num_hidden_layers=12							,    )







							def      __lowerCAmelCase    (						self :						Any      )    ->							Optional[int]:


														"""simple docstring"""


														self.config_tester.run_common_tests()







							@unittest.skip(reason='''SwiftFormer does not use inputs_embeds'''      )
							def      __lowerCAmelCase    (						self :						List[str]      )    ->							int:


														"""simple docstring"""


														pass







							def      __lowerCAmelCase    (						self :						int      )    ->							Dict:


														"""simple docstring"""


														_a  ,							_a			  =       self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					_a			  =       model_class(lowerCAmelCase_      )
																					_a			  =       model.get_output_embeddings()
																					self.assertTrue(x is None or isinstance(lowerCAmelCase_							,    nn.Linear      )      )







							def      __lowerCAmelCase    (						self :						Any      )    ->							List[str]:


														"""simple docstring"""


														_a  ,							_a			  =       self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					_a			  =       model_class(lowerCAmelCase_      )
																					_a			  =       inspect.signature(model.forward      )
																					# signature.parameters is an OrderedDict => so arg_names order is deterministic
																					_a			  =       [*signature.parameters.keys()]

																					_a			  =       ['''pixel_values''']
																					self.assertListEqual(arg_names[:1]							,    lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						str      )    ->							Optional[int]:


														"""simple docstring"""


														_a			  =       self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_model(*lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						int      )    ->							Tuple:


														"""simple docstring"""


														_a			  =       self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_image_classification(*lowerCAmelCase_      )







							@slow
							def      __lowerCAmelCase    (						self :						Optional[int]      )    ->							Union[str, Any]:


														"""simple docstring"""


														for model_name in SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																					_a			  =       SwiftFormerModel.from_pretrained(lowerCAmelCase_      )
																					self.assertIsNotNone(lowerCAmelCase_      )







							@unittest.skip(reason='''SwiftFormer does not output attentions'''      )
							def      __lowerCAmelCase    (						self :						Any      )    ->							Optional[int]:


														"""simple docstring"""


														pass







							def      __lowerCAmelCase    (						self :						str      )    ->							Any:


														"""simple docstring"""


														def check_hidden_states_output(lowerCAmelCase_ :						Any							,    lowerCAmelCase_ :						Union[str, Any]							,    lowerCAmelCase_ :						List[Any]      ):
																					_a			  =       model_class(lowerCAmelCase_      )
																					model.to(lowerCAmelCase_      )
																					model.eval()

																					with torch.no_grad():
																												_a			  =       model(**self._prepare_for_class(lowerCAmelCase_							,    lowerCAmelCase_      )      )

																					_a			  =       outputs.hidden_states

																					_a			  =       8
																					self.assertEqual(len(lowerCAmelCase_      )							,    lowerCAmelCase_      )  # TODO

																					# SwiftFormer's feature maps are of shape (batch_size, embed_dims, height, width)
																					# with the width and height being successively divided by 2, after every 2 blocks
																					for i in range(len(lowerCAmelCase_      )      ):
																												self.assertEqual(
																												    hidden_states[i].shape							,    torch.Size(
																												        [
																												            self.model_tester.batch_size,
																												            self.model_tester.embed_dims[i // 2],
																												            (self.model_tester.image_size // 4) // 2 ** (i // 2),
																												            (self.model_tester.image_size // 4) // 2 ** (i // 2),
																												        ]      )							,    )

														_a  ,							_a			  =       self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					_a			  =       True
																					check_hidden_states_output(lowerCAmelCase_							,    lowerCAmelCase_							,    lowerCAmelCase_      )

																					# check that output_hidden_states also work using config
																					del inputs_dict["output_hidden_states"]
																					_a			  =       True

																					check_hidden_states_output(lowerCAmelCase_							,    lowerCAmelCase_							,    lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						Optional[Any]      )    ->							List[str]:


														"""simple docstring"""


														def _config_zero_init(lowerCAmelCase_ :						Optional[Any]      ):
																					_a			  =       copy.deepcopy(lowerCAmelCase_      )
																					for key in configs_no_init.__dict__.keys():
																												if "_range" in key or "_std" in key or "initializer_factor" in key or "layer_scale" in key:
																																			setattr(lowerCAmelCase_							,    lowerCAmelCase_							,    1e-10      )
																												if isinstance(getattr(lowerCAmelCase_							,    lowerCAmelCase_							,    lowerCAmelCase_      )							,    lowerCAmelCase_      ):
																																			_a			  =       _config_zero_init(getattr(lowerCAmelCase_							,    lowerCAmelCase_      )      )
																																			setattr(lowerCAmelCase_							,    lowerCAmelCase_							,    lowerCAmelCase_      )
																					return configs_no_init

														_a  ,							_a			  =       self.model_tester.prepare_config_and_inputs_for_common()

														_a			  =       _config_zero_init(lowerCAmelCase_      )
														for model_class in self.all_model_classes:
																					_a			  =       model_class(config=lowerCAmelCase_      )
																					for name, param in model.named_parameters():
																												if param.requires_grad:
																																			self.assertIn(
																																			    ((param.data.mean() * 1e9) / 1e9).round().item()							,    [0.0, 1.0]							,    msg=F'Parameter {name} of model {model_class} seems not properly initialized'							,    )







							@unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.'''      )
							def      __lowerCAmelCase    (						self :						Any      )    ->							int:


														"""simple docstring"""


														pass



def 	snake_case_					():





							'''simple docstring'''


							_a			  =       Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png'''   )
							return image

@require_torch
@require_vision
class     A					(	unittest.TestCase					):







							@cached_property
							def      __lowerCAmelCase    (						self :						Tuple      )    ->							Any:


														"""simple docstring"""


														return ViTImageProcessor.from_pretrained('''MBZUAI/swiftformer-xs'''      ) if is_vision_available() else None







							@slow
							def      __lowerCAmelCase    (						self :						Tuple      )    ->							int:


														"""simple docstring"""


														_a			  =       SwiftFormerForImageClassification.from_pretrained('''MBZUAI/swiftformer-xs'''      ).to(lowerCAmelCase_      )

														_a			  =       self.default_image_processor
														_a			  =       prepare_img()
														_a			  =       image_processor(images=lowerCAmelCase_							,    return_tensors='''pt'''      ).to(lowerCAmelCase_      )

														# forward pass
														with torch.no_grad():
																					_a			  =       model(**lowerCAmelCase_      )

														# verify the logits
														_a			  =       torch.Size((1, 10_00)      )
														self.assertEqual(outputs.logits.shape							,    lowerCAmelCase_      )

														_a			  =       torch.tensor([[-2.1703e00, 2.1107e00, -2.0811e00]]      ).to(lowerCAmelCase_      )
														self.assertTrue(torch.allclose(outputs.logits[0, :3]							,    lowerCAmelCase_							,    atol=1e-4      )      )







'''simple docstring'''


from typing import Dict, List, Optional, Union

import numpy as np

from transformers.utils import is_vision_available
from transformers.utils.generic import TensorType

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import (
    center_crop,
    get_resize_output_image_size,
    normalize,
    rescale,
    resize,
    to_channel_dimension_format,
)
from ...image_utils import (
    IMAGENET_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    is_valid_image,
    to_numpy_array,
    valid_images,
)
from ...utils import logging


if is_vision_available():
				import PIL

_snake_case   :   str     							=	logging.get_logger(__name__)
def 	snake_case_					(UpperCamelCase :						Optional[int]   ):





							'''simple docstring'''


							if isinstance(UpperCamelCase				,		(list, tuple)   ) and isinstance(videos[0]				,		(list, tuple)   ) and is_valid_image(videos[0][0]   ):
														return videos

							elif isinstance(UpperCamelCase				,		(list, tuple)   ) and is_valid_image(videos[0]   ):
														return [videos]

							elif is_valid_image(UpperCamelCase   ):
														return [[videos]]

							raise ValueError(f'Could not make batched video from {videos}'   )

class     A					(	_a					):
							lowercase_           =       ['pixel_values']







							def __init__(						self :						List[Any]							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						PILImageResampling = PILImageResampling.BILINEAR							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						Union[int, float] = 1 / 2_55							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    **lowerCAmelCase_ :						List[str]							,    )    ->							None:


														"""simple docstring"""


														super().__init__(**lowerCAmelCase_      )
														_a			  =       size if size is not None else {'''shortest_edge''': 2_56}
														_a			  =       get_size_dict(lowerCAmelCase_							,    default_to_square=lowerCAmelCase_      )
														_a			  =       crop_size if crop_size is not None else {'''height''': 2_24, '''width''': 2_24}
														_a			  =       get_size_dict(lowerCAmelCase_							,    param_name='''crop_size'''      )

														_a			  =       do_resize
														_a			  =       size
														_a			  =       do_center_crop
														_a			  =       crop_size
														_a			  =       resample
														_a			  =       do_rescale
														_a			  =       rescale_factor
														_a			  =       offset
														_a			  =       do_normalize
														_a			  =       image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
														_a			  =       image_std if image_std is not None else IMAGENET_STANDARD_STD







							def      __lowerCAmelCase    (						self :						List[str]							,    lowerCAmelCase_ :						np.ndarray							,    lowerCAmelCase_ :						Dict[str, int]							,    lowerCAmelCase_ :						PILImageResampling = PILImageResampling.BILINEAR							,    lowerCAmelCase_ :						Optional[Union[str, ChannelDimension]] = None							,    **lowerCAmelCase_ :						Union[str, Any]							,    )    ->							np.ndarray:


														"""simple docstring"""


														_a			  =       get_size_dict(lowerCAmelCase_							,    default_to_square=lowerCAmelCase_      )
														if "shortest_edge" in size:
																					_a			  =       get_resize_output_image_size(lowerCAmelCase_							,    size['''shortest_edge''']							,    default_to_square=lowerCAmelCase_      )
														elif "height" in size and "width" in size:
																					_a			  =       (size['''height'''], size['''width'''])
														else:
																					raise ValueError(F'Size must have \'height\' and \'width\' or \'shortest_edge\' as keys. Got {size.keys()}'      )
														return resize(lowerCAmelCase_							,    size=lowerCAmelCase_							,    resample=lowerCAmelCase_							,    data_format=lowerCAmelCase_							,    **lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						Optional[Any]							,    lowerCAmelCase_ :						np.ndarray							,    lowerCAmelCase_ :						Dict[str, int]							,    lowerCAmelCase_ :						Optional[Union[str, ChannelDimension]] = None							,    **lowerCAmelCase_ :						Tuple							,    )    ->							np.ndarray:


														"""simple docstring"""


														_a			  =       get_size_dict(lowerCAmelCase_      )
														if "height" not in size or "width" not in size:
																					raise ValueError(F'Size must have \'height\' and \'width\' as keys. Got {size.keys()}'      )
														return center_crop(lowerCAmelCase_							,    size=(size['''height'''], size['''width'''])							,    data_format=lowerCAmelCase_							,    **lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						List[Any]							,    lowerCAmelCase_ :						np.ndarray							,    lowerCAmelCase_ :						Union[int, float]							,    lowerCAmelCase_ :						bool = True							,    lowerCAmelCase_ :						Optional[Union[str, ChannelDimension]] = None							,    **lowerCAmelCase_ :						Any							,    )    ->							Optional[Any]:


														"""simple docstring"""


														_a			  =       image.astype(np.floataa      )
														if offset:
																					_a			  =       image - (scale / 2)
														return rescale(lowerCAmelCase_							,    scale=lowerCAmelCase_							,    data_format=lowerCAmelCase_							,    **lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						List[Any]							,    lowerCAmelCase_ :						np.ndarray							,    lowerCAmelCase_ :						Union[float, List[float]]							,    lowerCAmelCase_ :						Union[float, List[float]]							,    lowerCAmelCase_ :						Optional[Union[str, ChannelDimension]] = None							,    **lowerCAmelCase_ :						Union[str, Any]							,    )    ->							np.ndarray:


														"""simple docstring"""


														return normalize(lowerCAmelCase_							,    mean=lowerCAmelCase_							,    std=lowerCAmelCase_							,    data_format=lowerCAmelCase_							,    **lowerCAmelCase_      )







							def      __lowerCAmelCase    (						self :						Tuple							,    lowerCAmelCase_ :						ImageInput							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						PILImageResampling = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						float = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    lowerCAmelCase_ :						Optional[ChannelDimension] = ChannelDimension.FIRST							,    )    ->							np.ndarray:


														"""simple docstring"""


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

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

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

														if do_normalize and (image_mean is None or image_std is None):
																					raise ValueError('''Image mean and std must be specified if do_normalize is True.'''      )

														if offset and not do_rescale:
																					raise ValueError('''For offset, do_rescale must also be set to True.'''      )

														# All transformations expect numpy arrays.
														_a			  =       to_numpy_array(lowerCAmelCase_      )

														if do_resize:
																					_a			  =       self.resize(image=lowerCAmelCase_							,    size=lowerCAmelCase_							,    resample=lowerCAmelCase_      )

														if do_center_crop:
																					_a			  =       self.center_crop(lowerCAmelCase_							,    size=lowerCAmelCase_      )

														if do_rescale:
																					_a			  =       self.rescale(image=lowerCAmelCase_							,    scale=lowerCAmelCase_							,    offset=lowerCAmelCase_      )

														if do_normalize:
																					_a			  =       self.normalize(image=lowerCAmelCase_							,    mean=lowerCAmelCase_							,    std=lowerCAmelCase_      )

														_a			  =       to_channel_dimension_format(lowerCAmelCase_							,    lowerCAmelCase_      )
														return image







							def      __lowerCAmelCase    (						self :						str							,    lowerCAmelCase_ :						ImageInput							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						PILImageResampling = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Dict[str, int] = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						float = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						bool = None							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    lowerCAmelCase_ :						Optional[Union[float, List[float]]] = None							,    lowerCAmelCase_ :						Optional[Union[str, TensorType]] = None							,    lowerCAmelCase_ :						ChannelDimension = ChannelDimension.FIRST							,    **lowerCAmelCase_ :						Any							,    )    ->							PIL.Image.Image:


														"""simple docstring"""


														_a			  =       do_resize if do_resize is not None else self.do_resize
														_a			  =       resample if resample is not None else self.resample
														_a			  =       do_center_crop if do_center_crop is not None else self.do_center_crop
														_a			  =       do_rescale if do_rescale is not None else self.do_rescale
														_a			  =       rescale_factor if rescale_factor is not None else self.rescale_factor
														_a			  =       offset if offset is not None else self.offset
														_a			  =       do_normalize if do_normalize is not None else self.do_normalize
														_a			  =       image_mean if image_mean is not None else self.image_mean
														_a			  =       image_std if image_std is not None else self.image_std

														_a			  =       size if size is not None else self.size
														_a			  =       get_size_dict(lowerCAmelCase_							,    default_to_square=lowerCAmelCase_      )
														_a			  =       crop_size if crop_size is not None else self.crop_size
														_a			  =       get_size_dict(lowerCAmelCase_							,    param_name='''crop_size'''      )

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

														_a			  =       make_batched(lowerCAmelCase_      )

														_a			  =       [
														    [
														        self._preprocess_image(
														            image=lowerCAmelCase_							,    do_resize=lowerCAmelCase_							,    size=lowerCAmelCase_							,    resample=lowerCAmelCase_							,    do_center_crop=lowerCAmelCase_							,    crop_size=lowerCAmelCase_							,    do_rescale=lowerCAmelCase_							,    rescale_factor=lowerCAmelCase_							,    offset=lowerCAmelCase_							,    do_normalize=lowerCAmelCase_							,    image_mean=lowerCAmelCase_							,    image_std=lowerCAmelCase_							,    data_format=lowerCAmelCase_							,    )
														        for img in video
														    ]
														    for video in videos
														]

														_a			  =       {'''pixel_values''': videos}
														return BatchFeature(data=lowerCAmelCase_							,    tensor_type=lowerCAmelCase_      )

