


from typing import List, Optional, Union

import numpy as np
import PIL.Image

from ...image_processing_utils import BaseImageProcessor, BatchFeature
from ...image_transforms import rescale, resize, to_channel_dimension_format
from ...image_utils import (
    ChannelDimension,
    PILImageResampling,
    get_image_size,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, logging


A   :					Optional[int]	=      logging.get_logger(__name__)







class     _lowercase				(							lowercase__):


       """simple docstring"""




       A__      		=    ["pixel_values"]





       def __init__(     self							:    Dict      ,   __lowerCamelCase							:    bool = True      ,   __lowerCamelCase							:    int = 32      ,   __lowerCamelCase							:    int=PILImageResampling.BILINEAR      ,   __lowerCamelCase							:    bool = True      ,   **__lowerCamelCase							:    int      ,   ):


             '''simple docstring'''



             lowerCamelCase__	:       List[str]					=						do_resize
             lowerCamelCase__	:       List[Any]					=						do_rescale
             lowerCamelCase__	:       int					=						size_divisor
             lowerCamelCase__	:       Any					=						resample
             super().__init__(**__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Union[str, Any]      ,   __lowerCamelCase							:    np.ndarray      ,   __lowerCamelCase							:    int      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    Optional[ChannelDimension] = None      ,   **__lowerCamelCase							:    Optional[int] ):


             '''simple docstring'''



             lowerCamelCase__					,     lowerCamelCase__	:       List[Any]					=						get_image_size(__lowerCamelCase )
             # Rounds the height and width down to the closest multiple of size_divisor
             lowerCamelCase__	:       Tuple					=						height // size_divisor * size_divisor
             lowerCamelCase__	:       Dict					=						width // size_divisor * size_divisor
             lowerCamelCase__	:       Tuple					=						resize(__lowerCamelCase      ,   (new_h, new_w)      ,   resample=__lowerCamelCase      ,   data_format=__lowerCamelCase      ,   **__lowerCamelCase )
             return image





       def 		lowerCAmelCase  (     self							:    Any      ,   __lowerCamelCase							:    np.ndarray      ,   __lowerCamelCase							:    float      ,   __lowerCamelCase							:    Optional[ChannelDimension] = None      ,   **__lowerCamelCase							:    Tuple ):


             '''simple docstring'''



             return rescale(image=__lowerCamelCase      ,   scale=__lowerCamelCase      ,   data_format=__lowerCamelCase      ,   **__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Any      ,   __lowerCamelCase							:    Union["PIL.Image.Image", TensorType, List["PIL.Image.Image"], List[TensorType]]      ,   __lowerCamelCase							:    Optional[bool] = None      ,   __lowerCamelCase							:    Optional[int] = None      ,   __lowerCamelCase							:    List[str]=None      ,   __lowerCamelCase							:    Optional[bool] = None      ,   __lowerCamelCase							:    Optional[Union[TensorType, str]] = None      ,   __lowerCamelCase							:    ChannelDimension = ChannelDimension.FIRST      ,   **__lowerCamelCase							:    Tuple      ,   ):


             '''simple docstring'''



             lowerCamelCase__	:       Dict					=						do_resize if do_resize is not None else self.do_resize
             lowerCamelCase__	:       Union[str, Any]					=						do_rescale if do_rescale is not None else self.do_rescale
             lowerCamelCase__	:       Dict					=						size_divisor if size_divisor is not None else self.size_divisor
             lowerCamelCase__	:       List[str]					=						resample if resample is not None else self.resample

             if do_resize and size_divisor is None:
                   raise ValueError("size_divisor is required for resizing" )

             lowerCamelCase__	:       Union[str, Any]					=						make_list_of_images(__lowerCamelCase )

             if not valid_images(__lowerCamelCase ):
                   raise ValueError("Invalid image(s)" )

             # All transformations expect numpy arrays.
             lowerCamelCase__	:       Dict					=						[to_numpy_array(__lowerCamelCase ) for img in images]

             if do_resize:
                   lowerCamelCase__	:       Optional[Any]					=						[self.resize(__lowerCamelCase      ,   size_divisor=__lowerCamelCase      ,   resample=__lowerCamelCase ) for image in images]

             if do_rescale:
                   lowerCamelCase__	:       Any					=						[self.rescale(__lowerCamelCase      ,   scale=1 / 255 ) for image in images]

             lowerCamelCase__	:       Optional[Any]					=						[to_channel_dimension_format(__lowerCamelCase      ,   __lowerCamelCase ) for image in images]

             lowerCamelCase__	:       Dict					=						{"pixel_values": images}
             return BatchFeature(data=__lowerCamelCase      ,   tensor_type=__lowerCamelCase )






import unittest

from transformers import AlbertConfig, is_torch_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, slow, torch_device

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


if is_torch_available():
    import torch

    from transformers import (
        MODEL_FOR_PRETRAINING_MAPPING,
        AlbertForMaskedLM,
        AlbertForMultipleChoice,
        AlbertForPreTraining,
        AlbertForQuestionAnswering,
        AlbertForSequenceClassification,
        AlbertForTokenClassification,
        AlbertModel,
    )
    from transformers.models.albert.modeling_albert import ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST







class     _lowercase				:


       """simple docstring"""




       def __init__(     self							:    List[str]      ,   __lowerCamelCase							:    List[str]      ,   __lowerCamelCase							:    List[str]=13      ,   __lowerCamelCase							:    Dict=7      ,   __lowerCamelCase							:    List[Any]=True      ,   __lowerCamelCase							:    List[Any]=True      ,   __lowerCamelCase							:    Union[str, Any]=True      ,   __lowerCamelCase							:    Optional[Any]=True      ,   __lowerCamelCase							:    Optional[int]=99      ,   __lowerCamelCase							:    List[Any]=16      ,   __lowerCamelCase							:    Optional[Any]=36      ,   __lowerCamelCase							:    Optional[int]=6      ,   __lowerCamelCase							:    Union[str, Any]=6      ,   __lowerCamelCase							:    Optional[int]=6      ,   __lowerCamelCase							:    Dict=37      ,   __lowerCamelCase							:    List[Any]="gelu"      ,   __lowerCamelCase							:    Tuple=0.1      ,   __lowerCamelCase							:    Optional[Any]=0.1      ,   __lowerCamelCase							:    List[Any]=512      ,   __lowerCamelCase							:    Dict=16      ,   __lowerCamelCase							:    Union[str, Any]=2      ,   __lowerCamelCase							:    Dict=0.0_2      ,   __lowerCamelCase							:    Optional[Any]=3      ,   __lowerCamelCase							:    Dict=4      ,   __lowerCamelCase							:    Dict=None      ,   ):


             '''simple docstring'''



             lowerCamelCase__	:       Dict					=						parent
             lowerCamelCase__	:       List[Any]					=						batch_size
             lowerCamelCase__	:       Any					=						seq_length
             lowerCamelCase__	:       List[str]					=						is_training
             lowerCamelCase__	:       int					=						use_input_mask
             lowerCamelCase__	:       List[str]					=						use_token_type_ids
             lowerCamelCase__	:       int					=						use_labels
             lowerCamelCase__	:       Dict					=						vocab_size
             lowerCamelCase__	:       List[Any]					=						embedding_size
             lowerCamelCase__	:       Dict					=						hidden_size
             lowerCamelCase__	:       Any					=						num_hidden_layers
             lowerCamelCase__	:       Optional[Any]					=						num_hidden_groups
             lowerCamelCase__	:       Optional[int]					=						num_attention_heads
             lowerCamelCase__	:       List[str]					=						intermediate_size
             lowerCamelCase__	:       Optional[Any]					=						hidden_act
             lowerCamelCase__	:       str					=						hidden_dropout_prob
             lowerCamelCase__	:       Union[str, Any]					=						attention_probs_dropout_prob
             lowerCamelCase__	:       Optional[int]					=						max_position_embeddings
             lowerCamelCase__	:       List[Any]					=						type_vocab_size
             lowerCamelCase__	:       Optional[Any]					=						type_sequence_label_size
             lowerCamelCase__	:       Optional[int]					=						initializer_range
             lowerCamelCase__	:       str					=						num_labels
             lowerCamelCase__	:       List[Any]					=						num_choices
             lowerCamelCase__	:       Any					=						scope





       def 		lowerCAmelCase  (     self							:    Dict ):


             '''simple docstring'''



             lowerCamelCase__	:       Optional[Any]					=						ids_tensor([self.batch_size, self.seq_length]      ,   self.vocab_size )

             lowerCamelCase__	:       Optional[int]					=						None
             if self.use_input_mask:
                   lowerCamelCase__	:       Any					=						random_attention_mask([self.batch_size, self.seq_length] )

             lowerCamelCase__	:       Optional[Any]					=						None
             if self.use_token_type_ids:
                   lowerCamelCase__	:       Union[str, Any]					=						ids_tensor([self.batch_size, self.seq_length]      ,   self.type_vocab_size )

             lowerCamelCase__	:       Tuple					=						None
             lowerCamelCase__	:       List[str]					=						None
             lowerCamelCase__	:       int					=						None
             if self.use_labels:
                   lowerCamelCase__	:       Tuple					=						ids_tensor([self.batch_size]      ,   self.type_sequence_label_size )
                   lowerCamelCase__	:       Union[str, Any]					=						ids_tensor([self.batch_size, self.seq_length]      ,   self.num_labels )
                   lowerCamelCase__	:       str					=						ids_tensor([self.batch_size]      ,   self.num_choices )

             lowerCamelCase__	:       Union[str, Any]					=						self.get_config()

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





       def 		lowerCAmelCase  (     self							:    str ):


             '''simple docstring'''



             return AlbertConfig(
                 vocab_size=self.vocab_size      ,   hidden_size=self.hidden_size      ,   num_hidden_layers=self.num_hidden_layers      ,   num_attention_heads=self.num_attention_heads      ,   intermediate_size=self.intermediate_size      ,   hidden_act=self.hidden_act      ,   hidden_dropout_prob=self.hidden_dropout_prob      ,   attention_probs_dropout_prob=self.attention_probs_dropout_prob      ,   max_position_embeddings=self.max_position_embeddings      ,   type_vocab_size=self.type_vocab_size      ,   initializer_range=self.initializer_range      ,   num_hidden_groups=self.num_hidden_groups      ,   )





       def 		lowerCAmelCase  (     self							:    Dict      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Dict      ,   __lowerCamelCase							:    int      ,   __lowerCamelCase							:    List[str]      ,   __lowerCamelCase							:    List[str]      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    List[Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       int					=						AlbertModel(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Any					=						model(__lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase )
             lowerCamelCase__	:       Any					=						model(__lowerCamelCase      ,   token_type_ids=__lowerCamelCase )
             lowerCamelCase__	:       Optional[int]					=						model(__lowerCamelCase )
             self.parent.assertEqual(result.last_hidden_state.shape      ,   (self.batch_size, self.seq_length, self.hidden_size) )
             self.parent.assertEqual(result.pooler_output.shape      ,   (self.batch_size, self.hidden_size) )





       def 		lowerCAmelCase  (     self							:    Union[str, Any]      ,   __lowerCamelCase							:    Union[str, Any]      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Dict      ,   __lowerCamelCase							:    str      ,   __lowerCamelCase							:    Union[str, Any]      ,   __lowerCamelCase							:    int      ,   __lowerCamelCase							:    Tuple ):


             '''simple docstring'''



             lowerCamelCase__	:       Any					=						AlbertForPreTraining(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Union[str, Any]					=						model(
                 __lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   labels=__lowerCamelCase      ,   sentence_order_label=__lowerCamelCase      ,   )
             self.parent.assertEqual(result.prediction_logits.shape      ,   (self.batch_size, self.seq_length, self.vocab_size) )
             self.parent.assertEqual(result.sop_logits.shape      ,   (self.batch_size, config.num_labels) )





       def 		lowerCAmelCase  (     self							:    str      ,   __lowerCamelCase							:    str      ,   __lowerCamelCase							:    List[Any]      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    str      ,   __lowerCamelCase							:    List[Any]      ,   __lowerCamelCase							:    Optional[int]      ,   __lowerCamelCase							:    Tuple ):


             '''simple docstring'''



             lowerCamelCase__	:       Dict					=						AlbertForMaskedLM(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Tuple					=						model(__lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   labels=__lowerCamelCase )
             self.parent.assertEqual(result.logits.shape      ,   (self.batch_size, self.seq_length, self.vocab_size) )





       def 		lowerCAmelCase  (     self							:    Union[str, Any]      ,   __lowerCamelCase							:    Optional[int]      ,   __lowerCamelCase							:    List[Any]      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    int ):


             '''simple docstring'''



             lowerCamelCase__	:       str					=						AlbertForQuestionAnswering(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       str					=						model(
                 __lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   start_positions=__lowerCamelCase      ,   end_positions=__lowerCamelCase      ,   )
             self.parent.assertEqual(result.start_logits.shape      ,   (self.batch_size, self.seq_length) )
             self.parent.assertEqual(result.end_logits.shape      ,   (self.batch_size, self.seq_length) )





       def 		lowerCAmelCase  (     self							:    Optional[int]      ,   __lowerCamelCase							:    Tuple      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    Optional[int]      ,   __lowerCamelCase							:    Optional[int]      ,   __lowerCamelCase							:    Union[str, Any]      ,   __lowerCamelCase							:    Dict ):


             '''simple docstring'''



             lowerCamelCase__	:       int					=						self.num_labels
             lowerCamelCase__	:       Optional[int]					=						AlbertForSequenceClassification(__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Any					=						model(__lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   labels=__lowerCamelCase )
             self.parent.assertEqual(result.logits.shape      ,   (self.batch_size, self.num_labels) )





       def 		lowerCAmelCase  (     self							:    Dict      ,   __lowerCamelCase							:    Dict      ,   __lowerCamelCase							:    List[str]      ,   __lowerCamelCase							:    List[str]      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    Dict      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    List[Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       Optional[int]					=						self.num_labels
             lowerCamelCase__	:       List[str]					=						AlbertForTokenClassification(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Tuple					=						model(__lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   labels=__lowerCamelCase )
             self.parent.assertEqual(result.logits.shape      ,   (self.batch_size, self.seq_length, self.num_labels) )





       def 		lowerCAmelCase  (     self							:    Tuple      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    Optional[Any]      ,   __lowerCamelCase							:    List[Any]      ,   __lowerCamelCase							:    List[Any]      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    Any      ,   __lowerCamelCase							:    Union[str, Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       Union[str, Any]					=						self.num_choices
             lowerCamelCase__	:       Optional[int]					=						AlbertForMultipleChoice(config=__lowerCamelCase )
             model.to(__lowerCamelCase )
             model.eval()
             lowerCamelCase__	:       Any					=						input_ids.unsqueeze(1 ).expand(-1      ,   self.num_choices      ,   -1 ).contiguous()
             lowerCamelCase__	:       Optional[int]					=						token_type_ids.unsqueeze(1 ).expand(-1      ,   self.num_choices      ,   -1 ).contiguous()
             lowerCamelCase__	:       Dict					=						input_mask.unsqueeze(1 ).expand(-1      ,   self.num_choices      ,   -1 ).contiguous()
             lowerCamelCase__	:       int					=						model(
                 __lowerCamelCase      ,   attention_mask=__lowerCamelCase      ,   token_type_ids=__lowerCamelCase      ,   labels=__lowerCamelCase      ,   )
             self.parent.assertEqual(result.logits.shape      ,   (self.batch_size, self.num_choices) )





       def 		lowerCAmelCase  (     self							:    str ):


             '''simple docstring'''



             lowerCamelCase__	:       int					=						self.prepare_config_and_inputs()
             (
                 (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     (
                 lowerCamelCase__
             )					,     
             )	:       Union[str, Any]					=						config_and_inputs
             lowerCamelCase__	:       str					=						{"input_ids": input_ids, "token_type_ids": token_type_ids, "attention_mask": input_mask}
             return config, inputs_dict







@require_torch
class     _lowercase				(							lowercase__							,						lowercase__							,						unittest.TestCase):


       """simple docstring"""




       A__      		=    (
           (
               AlbertModel,
               AlbertForPreTraining,
               AlbertForMaskedLM,
               AlbertForMultipleChoice,
               AlbertForSequenceClassification,
               AlbertForTokenClassification,
               AlbertForQuestionAnswering,
           )
           if is_torch_available()
           else ()
       )
       A__      		=    (
           {
               "feature-extraction": AlbertModel,
               "fill-mask": AlbertForMaskedLM,
               "question-answering": AlbertForQuestionAnswering,
               "text-classification": AlbertForSequenceClassification,
               "token-classification": AlbertForTokenClassification,
               "zero-shot": AlbertForSequenceClassification,
           }
           if is_torch_available()
           else {}
       )
       A__      		=    True





       def 		lowerCAmelCase  (     self							:    List[str]      ,   __lowerCamelCase							:    int      ,   __lowerCamelCase							:    Tuple      ,   __lowerCamelCase							:    Dict=False ):


             '''simple docstring'''



             lowerCamelCase__	:       Any					=						super()._prepare_for_class(__lowerCamelCase      ,   __lowerCamelCase      ,   return_labels=__lowerCamelCase )

             if return_labels:
                   if model_class in get_values(__lowerCamelCase ):
                         lowerCamelCase__	:       Union[str, Any]					=						torch.zeros(
                             (self.model_tester.batch_size, self.model_tester.seq_length)      ,   dtype=torch.long      ,   device=__lowerCamelCase )
                         lowerCamelCase__	:       List[str]					=						torch.zeros(
                             self.model_tester.batch_size      ,   dtype=torch.long      ,   device=__lowerCamelCase )
             return inputs_dict





       def 		lowerCAmelCase  (     self							:    Optional[Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       Optional[int]					=						AlbertModelTester(self )
             lowerCamelCase__	:       Optional[Any]					=						ConfigTester(self      ,   config_class=__lowerCamelCase      ,   hidden_size=37 )





       def 		lowerCAmelCase  (     self							:    Tuple ):


             '''simple docstring'''



             self.config_tester.run_common_tests()





       def 		lowerCAmelCase  (     self							:    Dict ):


             '''simple docstring'''



             lowerCamelCase__	:       Optional[Any]					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_model(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Union[str, Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       Union[str, Any]					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_pretraining(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Any ):


             '''simple docstring'''



             lowerCamelCase__	:       int					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_masked_lm(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Any ):


             '''simple docstring'''



             lowerCamelCase__	:       List[Any]					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_multiple_choice(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Tuple ):


             '''simple docstring'''



             lowerCamelCase__	:       Optional[Any]					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_question_answering(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Union[str, Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       List[str]					=						self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_sequence_classification(*__lowerCamelCase )





       def 		lowerCAmelCase  (     self							:    Optional[Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       List[str]					=						self.model_tester.prepare_config_and_inputs()
             for type in ["absolute", "relative_key", "relative_key_query"]:
                   lowerCamelCase__	:       Dict					=						type
                   self.model_tester.create_and_check_model(*__lowerCamelCase )





       @slow
       def 		lowerCAmelCase  (     self							:    Optional[Any] ):


             '''simple docstring'''



             for model_name in ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                   lowerCamelCase__	:       List[str]					=						AlbertModel.from_pretrained(__lowerCamelCase )
                   self.assertIsNotNone(__lowerCamelCase )







@require_torch
class     _lowercase				(							unittest.TestCase):


       """simple docstring"""




       @slow
       def 		lowerCAmelCase  (     self							:    Union[str, Any] ):


             '''simple docstring'''



             lowerCamelCase__	:       List[Any]					=						AlbertModel.from_pretrained("albert-base-v2" )
             lowerCamelCase__	:       Any					=						torch.tensor([[0, 345, 232, 328, 740, 140, 1695, 69, 6078, 1588, 2]] )
             lowerCamelCase__	:       int					=						torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]] )
             with torch.no_grad():
                   lowerCamelCase__	:       List[Any]					=						model(__lowerCamelCase      ,   attention_mask=__lowerCamelCase )[0]
             lowerCamelCase__	:       Tuple					=						torch.Size((1, 11, 768) )
             self.assertEqual(output.shape      ,   __lowerCamelCase )
             lowerCamelCase__	:       Dict					=						torch.tensor(
                 [[[-0.6_5_1_3, 1.5_0_3_5, -0.2_7_6_6], [-0.6_5_1_5, 1.5_0_4_6, -0.2_7_8_0], [-0.6_5_1_2, 1.5_0_4_9, -0.2_7_8_4]]] )

             self.assertTrue(torch.allclose(output[:, 1:4, 1:4]      ,   __lowerCamelCase      ,   atol=1E-4 ) )


