


from __future__ import annotations

import inspect
import unittest
from typing import List, Tuple

from transformers import RegNetConfig
from transformers.testing_utils import require_tf, require_vision, slow
from transformers.utils import cached_property, is_tf_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
 import tensorflow as tf

 from transformers import TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST, TFRegNetForImageClassification, TFRegNetModel


if is_vision_available():
 from PIL import Image

 from transformers import AutoImageProcessor

class   A__ :







    """simple docstring"""

    def __init__(	self      , __snake_case      , __snake_case=3      , __snake_case=3_2      , __snake_case=3      , __snake_case=1_0      , __snake_case=[1_0, 2_0, 3_0, 4_0]      , __snake_case=[1, 1, 2, 1]      , __snake_case=True      , __snake_case=True      , __snake_case="relu"      , __snake_case=3      , __snake_case=None      , ):
         snake_case					=    parent
         snake_case					=    batch_size
         snake_case					=    image_size
         snake_case					=    num_channels
         snake_case					=    embeddings_size
         snake_case					=    hidden_sizes
         snake_case					=    depths
         snake_case					=    is_training
         snake_case					=    use_labels
         snake_case					=    hidden_act
         snake_case					=    num_labels
         snake_case					=    scope
         snake_case					=    len(__snake_case   )
    def 		a_      (	self   ):
         snake_case					=    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]   )

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

         snake_case					=    self.get_config()
         return config, pixel_values, labels
    def 		a_      (	self   ):
         return RegNetConfig(
             num_channels=self.num_channels      , embeddings_size=self.embeddings_size      , hidden_sizes=self.hidden_sizes      , depths=self.depths      , hidden_act=self.hidden_act      , num_labels=self.num_labels      , )
    def 		a_      (	self      , __snake_case      , __snake_case      , __snake_case   ):
         snake_case					=    TFRegNetModel(config=__snake_case   )
         snake_case					=    model(__snake_case      , training=__snake_case   )
         # expected last hidden states: B, C, H // 32, W // 32
         self.parent.assertEqual(
             result.last_hidden_state.shape      , (self.batch_size, self.hidden_sizes[-1], self.image_size // 3_2, self.image_size // 3_2)      , )
    def 		a_      (	self      , __snake_case      , __snake_case      , __snake_case   ):
         snake_case					=    self.num_labels
         snake_case					=    TFRegNetForImageClassification(__snake_case   )
         snake_case					=    model(__snake_case      , labels=__snake_case      , training=__snake_case   )
         self.parent.assertEqual(result.logits.shape      , (self.batch_size, self.num_labels)   )




    def 		a_      (	self   ):
         snake_case					=    self.prepare_config_and_inputs()
         snake_case			,  snake_case			,  snake_case					=    config_and_inputs
         snake_case					=    {'''pixel_values''': pixel_values}
         return config, inputs_dict






@require_tf
class   A__ (   snake_case__	, snake_case__	, unittest.TestCase     ):







    """simple docstring"""

    __magic_name__        =		(TFRegNetModel, TFRegNetForImageClassification) if is_tf_available() else ()
    __magic_name__        =		(
        {'feature-extraction': TFRegNetModel, 'image-classification': TFRegNetForImageClassification}
        if is_tf_available()
        else {}
    )

    __magic_name__        =		False
    __magic_name__        =		False
    __magic_name__        =		False
    __magic_name__        =		False
    __magic_name__        =		False
    def 		a_      (	self   ):
         snake_case					=    TFRegNetModelTester(self   )
         snake_case					=    ConfigTester(self      , config_class=__snake_case      , has_text_modality=__snake_case   )
    def 		a_      (	self   ):
         return
    @unittest.skip(reason='''RegNet does not use inputs_embeds'''   )
    def 		a_      (	self   ):
         pass
    @unittest.skipIf(
        not is_tf_available() or len(tf.config.list_physical_devices('''GPU'''   )   ) == 0      , reason='''TF does not support backprop for grouped convolutions on CPU.'''      , )
    @slow
    def 		a_      (	self   ):
         super().test_keras_fit()
    @unittest.skip(reason='''RegNet does not support input and output embeddings'''   )
    def 		a_      (	self   ):
         pass
    def 		a_      (	self   ):
         snake_case			,  snake_case					=    self.model_tester.prepare_config_and_inputs_for_common()

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

              snake_case					=    ['''pixel_values''']
              self.assertListEqual(arg_names[:1]      , __snake_case   )
    def 		a_      (	self   ):
         snake_case					=    self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_model(*__snake_case   )
    def 		a_      (	self   ):
         def check_hidden_states_output(__snake_case      , __snake_case      , __snake_case   ):
              snake_case					=    model_class(__snake_case   )
              snake_case					=    model(**self._prepare_for_class(__snake_case      , __snake_case   )      , training=__snake_case   )

              snake_case					=    outputs.encoder_hidden_states if config.is_encoder_decoder else outputs.hidden_states

              snake_case					=    self.model_tester.num_stages
              self.assertEqual(len(__snake_case   )      , expected_num_stages + 1   )

              # RegNet's feature maps are of shape (batch_size, num_channels, height, width)
              self.assertListEqual(
                  list(hidden_states[0].shape[-2:]   )      , [self.model_tester.image_size // 2, self.model_tester.image_size // 2]      , )

         snake_case			,  snake_case					=    self.model_tester.prepare_config_and_inputs_for_common()
         snake_case					=    ['''basic''', '''bottleneck''']
         for model_class in self.all_model_classes:
              for layer_type in layers_type:
                   snake_case					=    layer_type
                   snake_case					=    True
                   check_hidden_states_output(__snake_case      , __snake_case      , __snake_case   )

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

                   check_hidden_states_output(__snake_case      , __snake_case      , __snake_case   )
    def 		a_      (	self   ):
         snake_case			,  snake_case					=    self.model_tester.prepare_config_and_inputs_for_common()

         def check_equivalence(__snake_case      , __snake_case      , __snake_case      , __snake_case={}   ):
              snake_case					=    model(__snake_case      , return_dict=__snake_case      , **__snake_case   )
              snake_case					=    model(__snake_case      , return_dict=__snake_case      , **__snake_case   ).to_tuple()

              def recursive_check(__snake_case      , __snake_case   ):
                   if isinstance(__snake_case      , (List, Tuple)   ):
                        for tuple_iterable_value, dict_iterable_value in zip(__snake_case      , __snake_case   ):
                             recursive_check(__snake_case      , __snake_case   )
                   elif tuple_object is None:
                        return
                   else:
                        self.assertTrue(
                            all(tf.equal(__snake_case      , __snake_case   )   )      , msg=(
                                '''Tuple and dict output are not equal. Difference:'''
                                F''' {tf.math.reduce_max(tf.abs(tuple_object - dict_object   )   )}'''
                            )      , )

                   recursive_check(__snake_case      , __snake_case   )

         for model_class in self.all_model_classes:
              snake_case					=    model_class(__snake_case   )

              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case   )
              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case   )
              check_equivalence(__snake_case      , __snake_case      , __snake_case   )

              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case      , return_labels=__snake_case   )
              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case      , return_labels=__snake_case   )
              check_equivalence(__snake_case      , __snake_case      , __snake_case   )

              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case   )
              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case   )
              check_equivalence(__snake_case      , __snake_case      , __snake_case      , {'''output_hidden_states''': True}   )

              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case      , return_labels=__snake_case   )
              snake_case					=    self._prepare_for_class(__snake_case      , __snake_case      , return_labels=__snake_case   )
              check_equivalence(__snake_case      , __snake_case      , __snake_case      , {'''output_hidden_states''': True}   )
    def 		a_      (	self   ):
         snake_case					=    self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_for_image_classification(*__snake_case   )




    @slow
    def 		a_      (	self   ):
         for model_name in TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              snake_case					=    TFRegNetModel.from_pretrained(__snake_case   )
              self.assertIsNotNone(__snake_case   )






def       UpperCAmelCase__						():



     """simple docstring"""






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

@require_tf
@require_vision
class   A__ (   unittest.TestCase     ):







    """simple docstring"""

    @cached_property
    def 		a_      (	self   ):
         return (
             AutoImageProcessor.from_pretrained(TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[0]   )
             if is_vision_available()
             else None
         )




    @slow
    def 		a_      (	self   ):
         snake_case					=    TFRegNetForImageClassification.from_pretrained(TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST[0]   )

         snake_case					=    self.default_image_processor
         snake_case					=    prepare_img()
         snake_case					=    image_processor(images=__snake_case      , return_tensors='''tf'''   )

         # forward pass
         snake_case					=    model(**__snake_case      , training=__snake_case   )

         # verify the logits
         snake_case					=    tf.TensorShape((1, 1_0_0_0)   )
         self.assertEqual(outputs.logits.shape      , __snake_case   )

         snake_case					=    tf.constant([-0.4180, -1.5051, -3.4836]   )

         tf.debugging.assert_near(outputs.logits[0, :3]      , __snake_case      , atol=1E-4   )








import argparse
import json
from collections import OrderedDict

import torch
from huggingface_hub import cached_download, hf_hub_url

from transformers import AutoImageProcessor, CvtConfig, CvtForImageClassification
def       UpperCAmelCase__						(UpperCamelCase_    ):



     """simple docstring"""






     snake_case					=    []
     embed.append(
         (
             F'''cvt.encoder.stages.{idx}.embedding.convolution_embeddings.projection.weight''',
             F'''stage{idx}.patch_embed.proj.weight''',
         )    )
     embed.append(
         (
             F'''cvt.encoder.stages.{idx}.embedding.convolution_embeddings.projection.bias''',
             F'''stage{idx}.patch_embed.proj.bias''',
         )    )
     embed.append(
         (
             F'''cvt.encoder.stages.{idx}.embedding.convolution_embeddings.normalization.weight''',
             F'''stage{idx}.patch_embed.norm.weight''',
         )    )
     embed.append(
         (
             F'''cvt.encoder.stages.{idx}.embedding.convolution_embeddings.normalization.bias''',
             F'''stage{idx}.patch_embed.norm.bias''',
         )    )
     return embed
def       UpperCAmelCase__						(UpperCamelCase_							,UpperCamelCase_    ):



     """simple docstring"""






     snake_case					=    []
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.convolution.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.conv.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.normalization.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.bn.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.normalization.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.bn.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.normalization.running_mean''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.bn.running_mean''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.normalization.running_var''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.bn.running_var''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_query.convolution_projection.normalization.num_batches_tracked''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_q.bn.num_batches_tracked''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.convolution.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.conv.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.normalization.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.bn.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.normalization.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.bn.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.normalization.running_mean''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.bn.running_mean''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.normalization.running_var''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.bn.running_var''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_key.convolution_projection.normalization.num_batches_tracked''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_k.bn.num_batches_tracked''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.convolution.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.conv.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.normalization.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.bn.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.normalization.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.bn.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.normalization.running_mean''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.bn.running_mean''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.normalization.running_var''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.bn.running_var''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.convolution_projection_value.convolution_projection.normalization.num_batches_tracked''',
             F'''stage{idx}.blocks.{cnt}.attn.conv_proj_v.bn.num_batches_tracked''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_query.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_q.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_query.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_q.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_key.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_k.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_key.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_k.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_value.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_v.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.attention.projection_value.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.proj_v.bias''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.output.dense.weight''',
             F'''stage{idx}.blocks.{cnt}.attn.proj.weight''',
         )    )
     attention_weights.append(
         (
             F'''cvt.encoder.stages.{idx}.layers.{cnt}.attention.output.dense.bias''',
             F'''stage{idx}.blocks.{cnt}.attn.proj.bias''',
         )    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.intermediate.dense.weight''', F'''stage{idx}.blocks.{cnt}.mlp.fc1.weight''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.intermediate.dense.bias''', F'''stage{idx}.blocks.{cnt}.mlp.fc1.bias''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.output.dense.weight''', F'''stage{idx}.blocks.{cnt}.mlp.fc2.weight''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.output.dense.bias''', F'''stage{idx}.blocks.{cnt}.mlp.fc2.bias''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.layernorm_before.weight''', F'''stage{idx}.blocks.{cnt}.norm1.weight''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.layernorm_before.bias''', F'''stage{idx}.blocks.{cnt}.norm1.bias''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.layernorm_after.weight''', F'''stage{idx}.blocks.{cnt}.norm2.weight''')    )
     attention_weights.append(
         (F'''cvt.encoder.stages.{idx}.layers.{cnt}.layernorm_after.bias''', F'''stage{idx}.blocks.{cnt}.norm2.bias''')    )
     return attention_weights
def       UpperCAmelCase__						(UpperCamelCase_    ):



     """simple docstring"""






     snake_case					=    []
     token.append((F'''cvt.encoder.stages.{idx}.cls_token''', '''stage2.cls_token''')    )
     return token
def       UpperCAmelCase__						():



     """simple docstring"""






     snake_case					=    []
     head.append(('''layernorm.weight''', '''norm.weight''')    )
     head.append(('''layernorm.bias''', '''norm.bias''')    )
     head.append(('''classifier.weight''', '''head.weight''')    )
     head.append(('''classifier.bias''', '''head.bias''')    )
     return head
def       UpperCAmelCase__						(UpperCamelCase_							,UpperCamelCase_							,UpperCamelCase_							,UpperCamelCase_    ):



     """simple docstring"""






     snake_case					=    '''imagenet-1k-id2label.json'''
     snake_case					=    10_00

     snake_case					=    '''huggingface/label-files'''
     snake_case					=    num_labels
     snake_case					=    json.load(open(cached_download(hf_hub_url(UpperCamelCase_							,UpperCamelCase_							,repo_type='''dataset'''    )    )							,'''r'''    )    )
     snake_case					=    {int(UpperCamelCase_    ): v for k, v in idalabel.items()}

     snake_case					=    idalabel
     snake_case					=    {v: k for k, v in idalabel.items()}

     snake_case					=    snake_case					=    CvtConfig(num_labels=UpperCamelCase_							,idalabel=UpperCamelCase_							,labelaid=UpperCamelCase_    )

     # For depth size 13 (13 = 1+2+10)
     if cvt_model.rsplit('''/'''							,1    )[-1][4:6] == "13":
          snake_case					=    [1, 2, 10]

     # For depth size 21 (21 = 1+4+16)
     elif cvt_model.rsplit('''/'''							,1    )[-1][4:6] == "21":
          snake_case					=    [1, 4, 16]

     # For wide cvt (similar to wide-resnet) depth size 24 (w24 = 2 + 2 20)
     else:
          snake_case					=    [2, 2, 20]
          snake_case					=    [3, 12, 16]
          snake_case					=    [1_92, 7_68, 10_24]

     snake_case					=    CvtForImageClassification(UpperCamelCase_    )
     snake_case					=    AutoImageProcessor.from_pretrained('''facebook/convnext-base-224-22k-1k'''    )
     snake_case					=    image_size
     snake_case					=    torch.load(UpperCamelCase_							,map_location=torch.device('''cpu'''    )    )

     snake_case					=    OrderedDict()
     snake_case					=    []

     for idx in range(len(config.depth    )    ):
          if config.cls_token[idx]:
               snake_case					=    list_of_state_dict + cls_token(UpperCamelCase_    )
          snake_case					=    list_of_state_dict + embeddings(UpperCamelCase_    )
          for cnt in range(config.depth[idx]    ):
               snake_case					=    list_of_state_dict + attention(UpperCamelCase_							,UpperCamelCase_    )

     snake_case					=    list_of_state_dict + final()
     for gg in list_of_state_dict:
          print(UpperCamelCase_    )
     for i in range(len(UpperCamelCase_    )    ):
          snake_case					=    original_weights[list_of_state_dict[i][1]]

     model.load_state_dict(UpperCamelCase_    )
     model.save_pretrained(UpperCamelCase_    )
     image_processor.save_pretrained(UpperCamelCase_    )


# Download the weights from zoo: https://1drv.ms/u/s!AhIXJn_J-blW9RzF3rMW7SsLHa8h?e=blQ0Al

if __name__ == "__main__":
 _SCREAMING_SNAKE_CASE      :			Optional[int]      				=   argparse.ArgumentParser()
 parser.add_argument(
     "--cvt_model",
     default="cvt-w24",
     type=str,
     help="Name of the cvt model you'd like to convert.",
 )
 parser.add_argument(
     "--image_size",
     default=3_84,
     type=int,
     help="Input Image Size",
 )
 parser.add_argument(
     "--cvt_file_name",
     default=R"cvtmodels\CvT-w24-384x384-IN-22k.pth",
     type=str,
     help="Input Image Size",
 )
 parser.add_argument(
     "--pytorch_dump_folder_path", default=None, type=str, help="Path to the output PyTorch model directory."
 )

 _SCREAMING_SNAKE_CASE      :			Optional[int]      				=   parser.parse_args()
 convert_cvt_checkpoint(args.cvt_model, args.image_size, args.cvt_file_name, args.pytorch_dump_folder_path)




