


import inspect
import unittest

from transformers import SwinaSRConfig
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import is_torch_available, is_vision_available

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


if is_torch_available():
 import torch
 from torch import nn

 from transformers import SwinaSRForImageSuperResolution, SwinaSRModel
 from transformers.models.swinasr.modeling_swinasr import SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
 from PIL import Image

 from transformers import SwinaSRImageProcessor




class A						:






      def __init__(      self		:  Union[str, Any]    ,     lowercase_		:  str    ,     lowercase_		:  Optional[Any]=13    ,     lowercase_		:  Optional[Any]=32    ,     lowercase_		:  Optional[Any]=1    ,     lowercase_		:  Optional[Any]=3    ,     lowercase_		:  Tuple=16    ,     lowercase_		:  Any=[1, 2, 1]    ,     lowercase_		:  Optional[int]=[2, 2, 4]    ,     lowercase_		:  Optional[int]=2    ,     lowercase_		:  Dict=2.0    ,     lowercase_		:  Optional[int]=True    ,     lowercase_		:  Any=0.0    ,     lowercase_		:  Any=0.0    ,     lowercase_		:  Union[str, Any]=0.1    ,     lowercase_		:  List[str]="gelu"    ,     lowercase_		:  Union[str, Any]=False    ,     lowercase_		:  Any=True    ,     lowercase_		:  Any=0.02    ,     lowercase_		:  str=1E-5    ,     lowercase_		:  Union[str, Any]=True    ,     lowercase_		:  str=None    ,     lowercase_		:  Optional[Any]=False    ,     lowercase_		:  Optional[int]=2    ,     )      ->		Union[str, Any]:
             """simple docstring"""




             _lowerCamelCase :	Optional[Any]						=parent
             _lowerCamelCase :	Any						=batch_size
             _lowerCamelCase :	List[Any]						=image_size
             _lowerCamelCase :	Union[str, Any]						=patch_size
             _lowerCamelCase :	List[Any]						=num_channels
             _lowerCamelCase :	Optional[Any]						=embed_dim
             _lowerCamelCase :	List[str]						=depths
             _lowerCamelCase :	List[str]						=num_heads
             _lowerCamelCase :	Any						=window_size
             _lowerCamelCase :	int						=mlp_ratio
             _lowerCamelCase :	Tuple						=qkv_bias
             _lowerCamelCase :	Union[str, Any]						=hidden_dropout_prob
             _lowerCamelCase :	str						=attention_probs_dropout_prob
             _lowerCamelCase :	Tuple						=drop_path_rate
             _lowerCamelCase :	int						=hidden_act
             _lowerCamelCase :	Optional[Any]						=use_absolute_embeddings
             _lowerCamelCase :	Union[str, Any]						=patch_norm
             _lowerCamelCase :	str						=layer_norm_eps
             _lowerCamelCase :	Union[str, Any]						=initializer_range
             _lowerCamelCase :	str						=is_training
             _lowerCamelCase :	List[Any]						=scope
             _lowerCamelCase :	Optional[int]						=use_labels
             _lowerCamelCase :	List[Any]						=upscale

             # here we set some attributes to make tests pass
             _lowerCamelCase :	Optional[int]						=len(_lowerCamelCase				)
             _lowerCamelCase :	Union[str, Any]						=embed_dim
             _lowerCamelCase :	Union[str, Any]						=(image_size // patch_size) ** 2






      def  lowerCamelCase (      self		:  Tuple				)      ->		Optional[Any]:
             """simple docstring"""




             _lowerCamelCase :	int						=floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]				)

             _lowerCamelCase :	List[str]						=None
             if self.use_labels:
                    _lowerCamelCase :	Optional[int]						=ids_tensor([self.batch_size]    ,     self.type_sequence_label_size				)

             _lowerCamelCase :	List[str]						=self.get_config()

             return config, pixel_values, labels






      def  lowerCamelCase (      self		:  str				)      ->		Optional[Any]:
             """simple docstring"""




             return SwinaSRConfig(
                 image_size=self.image_size    ,     patch_size=self.patch_size    ,     num_channels=self.num_channels    ,     embed_dim=self.embed_dim    ,     depths=self.depths    ,     num_heads=self.num_heads    ,     window_size=self.window_size    ,     mlp_ratio=self.mlp_ratio    ,     qkv_bias=self.qkv_bias    ,     hidden_dropout_prob=self.hidden_dropout_prob    ,     attention_probs_dropout_prob=self.attention_probs_dropout_prob    ,     drop_path_rate=self.drop_path_rate    ,     hidden_act=self.hidden_act    ,     use_absolute_embeddings=self.use_absolute_embeddings    ,     path_norm=self.patch_norm    ,     layer_norm_eps=self.layer_norm_eps    ,     initializer_range=self.initializer_range    ,     upscale=self.upscale    ,     )






      def  lowerCamelCase (      self		:  List[str]    ,     lowercase_		:  str    ,     lowercase_		:  Optional[Any]    ,     lowercase_		:  List[Any]				)      ->		Any:
             """simple docstring"""




             _lowerCamelCase :	Dict						=SwinaSRModel(config=_lowerCamelCase				)
             model.to(_lowerCamelCase				)
             model.eval()
             _lowerCamelCase :	List[str]						=model(_lowerCamelCase				)

             self.parent.assertEqual(
                 result.last_hidden_state.shape    ,     (self.batch_size, self.embed_dim, self.image_size, self.image_size)				)






      def  lowerCamelCase (      self		:  Tuple    ,     lowercase_		:  Optional[int]    ,     lowercase_		:  Optional[Any]    ,     lowercase_		:  str				)      ->		Optional[int]:
             """simple docstring"""




             _lowerCamelCase :	Tuple						=SwinaSRForImageSuperResolution(_lowerCamelCase				)
             model.to(_lowerCamelCase				)
             model.eval()
             _lowerCamelCase :	Any						=model(_lowerCamelCase				)

             _lowerCamelCase :	Union[str, Any]						=self.image_size * self.upscale
             self.parent.assertEqual(
                 result.reconstruction.shape    ,     (self.batch_size, self.num_channels, expected_image_size, expected_image_size)				)






      def  lowerCamelCase (      self		:  Union[str, Any]				)      ->		List[Any]:
             """simple docstring"""




             _lowerCamelCase :	str						=self.prepare_config_and_inputs()
             _lowerCamelCase :	Union[str, Any]						=config_and_inputs
             _lowerCamelCase :	List[str]						={"""pixel_values""": pixel_values}
             return config, inputs_dict




@require_torch
class A						(     lowerCAmelCase__					,							lowerCAmelCase__					,							unittest.TestCase  ):
      UpperCamelCase__							:						List[Any]   =(SwinaSRModel, SwinaSRForImageSuperResolution) if is_torch_available() else ()
      UpperCamelCase__							:						Optional[int]   ={'feature-extraction': SwinaSRModel} if is_torch_available() else {}

      UpperCamelCase__							:						Union[str, Any]   =False
      UpperCamelCase__							:						Tuple   =False
      UpperCamelCase__							:						Tuple   =False
      UpperCamelCase__							:						Optional[int]   =False
      UpperCamelCase__							:						str   =False






      def  lowerCamelCase (      self		:  List[Any]				)      ->		Union[str, Any]:
             """simple docstring"""




             _lowerCamelCase :	Union[str, Any]						=SwinaSRModelTester(self				)
             _lowerCamelCase :	List[Any]						=ConfigTester(self    ,     config_class=_lowerCamelCase    ,     embed_dim=37				)






      def  lowerCamelCase (      self		:  Optional[Any]				)      ->		Optional[Any]:
             """simple docstring"""




             self.config_tester.create_and_test_config_to_json_string()
             self.config_tester.create_and_test_config_to_json_file()
             self.config_tester.create_and_test_config_from_and_save_pretrained()
             self.config_tester.create_and_test_config_with_num_labels()
             self.config_tester.check_config_can_be_init_without_params()
             self.config_tester.check_config_arguments_init()






      def  lowerCamelCase (      self		:  Any				)      ->		List[str]:
             """simple docstring"""




             _lowerCamelCase :	List[str]						=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_model(*_lowerCamelCase				)






      def  lowerCamelCase (      self		:  Dict				)      ->		Union[str, Any]:
             """simple docstring"""




             _lowerCamelCase :	Optional[Any]						=self.model_tester.prepare_config_and_inputs()
             self.model_tester.create_and_check_for_image_super_resolution(*_lowerCamelCase				)






      @unittest.skip(reason='Got `CUDA error: misaligned address` with PyTorch 2.0.0.'				)
      def  lowerCamelCase (      self		:  List[Any]				)      ->		List[Any]:
             """simple docstring"""




             pass






      @unittest.skip(reason='Swin2SR does not use inputs_embeds'				)
      def  lowerCamelCase (      self		:  Union[str, Any]				)      ->		Dict:
             """simple docstring"""




             pass






      @unittest.skip(reason='Swin2SR does not support training yet'				)
      def  lowerCamelCase (      self		:  int				)      ->		str:
             """simple docstring"""




             pass






      @unittest.skip(reason='Swin2SR does not support training yet'				)
      def  lowerCamelCase (      self		:  str				)      ->		Optional[int]:
             """simple docstring"""




             pass






      def  lowerCamelCase (      self		:  Any				)      ->		List[Any]:
             """simple docstring"""




             _lowerCamelCase :	Tuple						=self.model_tester.prepare_config_and_inputs_for_common()

             for model_class in self.all_model_classes:
                    _lowerCamelCase :	List[Any]						=model_class(_lowerCamelCase				)
                    self.assertIsInstance(model.get_input_embeddings()    ,     (nn.Module)				)
                    _lowerCamelCase :	str						=model.get_output_embeddings()
                    self.assertTrue(x is None or isinstance(_lowerCamelCase    ,     nn.Linear				)				)






      def  lowerCamelCase (      self		:  int				)      ->		Optional[Any]:
             """simple docstring"""




             _lowerCamelCase :	Optional[Any]						=self.model_tester.prepare_config_and_inputs_for_common()

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

                    _lowerCamelCase :	str						=["""pixel_values"""]
                    self.assertListEqual(arg_names[:1]    ,     _lowerCamelCase				)






      @slow
      def  lowerCamelCase (      self		:  Tuple				)      ->		List[str]:
             """simple docstring"""




             for model_name in SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                    _lowerCamelCase :	str						=SwinaSRModel.from_pretrained(_lowerCamelCase				)
                    self.assertIsNotNone(_lowerCamelCase				)






      def  lowerCamelCase (      self		:  Tuple				)      ->		Union[str, Any]:
             """simple docstring"""




             _lowerCamelCase :	List[str]						=self.model_tester.prepare_config_and_inputs_for_common()

             _lowerCamelCase :	List[Any]						=_config_zero_init(_lowerCamelCase				)
             for model_class in self.all_model_classes:
                    _lowerCamelCase :	Dict						=model_class(config=_lowerCamelCase				)
                    for name, param in model.named_parameters():
                           if "logit_scale" in name:
                                  continue
                           if param.requires_grad:
                                  self.assertIn(
                                      ((param.data.mean() * 1E9).round() / 1E9).item()    ,     [0.0, 1.0]    ,     msg=F'''Parameter {name} of model {model_class} seems not properly initialized'''    ,     )






      def  lowerCamelCase (      self		:  Optional[Any]				)      ->		List[str]:
             """simple docstring"""




             _lowerCamelCase :	Any						=self.model_tester.prepare_config_and_inputs_for_common()
             _lowerCamelCase :	List[Any]						=True

             for model_class in self.all_model_classes:
                    _lowerCamelCase :	str						=True
                    _lowerCamelCase :	Optional[Any]						=False
                    _lowerCamelCase :	Any						=True
                    _lowerCamelCase :	List[Any]						=model_class(_lowerCamelCase				)
                    model.to(_lowerCamelCase				)
                    model.eval()
                    with torch.no_grad():
                           _lowerCamelCase :	Union[str, Any]						=model(**self._prepare_for_class(_lowerCamelCase    ,     _lowerCamelCase				)				)
                    _lowerCamelCase :	List[str]						=outputs.attentions
                    _lowerCamelCase :	str						=len(self.model_tester.depths				)
                    self.assertEqual(len(_lowerCamelCase				)    ,     _lowerCamelCase				)

                    # check that output_attentions also work using config
                    del inputs_dict["output_attentions"]
                    _lowerCamelCase :	List[str]						=True
                    _lowerCamelCase :	Any						=config.window_size**2
                    _lowerCamelCase :	Any						=model_class(_lowerCamelCase				)
                    model.to(_lowerCamelCase				)
                    model.eval()
                    with torch.no_grad():
                           _lowerCamelCase :	Any						=model(**self._prepare_for_class(_lowerCamelCase    ,     _lowerCamelCase				)				)
                    _lowerCamelCase :	List[str]						=outputs.attentions
                    self.assertEqual(len(_lowerCamelCase				)    ,     _lowerCamelCase				)

                    self.assertListEqual(
                        list(attentions[0].shape[-3:]				)    ,     [self.model_tester.num_heads[0], window_size_squared, window_size_squared]    ,     )
                    _lowerCamelCase :	Optional[Any]						=len(_lowerCamelCase				)

                    # Check attention is always last and order is fine
                    _lowerCamelCase :	Union[str, Any]						=True
                    _lowerCamelCase :	Tuple						=True
                    _lowerCamelCase :	Tuple						=model_class(_lowerCamelCase				)
                    model.to(_lowerCamelCase				)
                    model.eval()
                    with torch.no_grad():
                           _lowerCamelCase :	int						=model(**self._prepare_for_class(_lowerCamelCase    ,     _lowerCamelCase				)				)

                    self.assertEqual(out_len + 1    ,     len(_lowerCamelCase				)				)

                    _lowerCamelCase :	Dict						=outputs.attentions

                    self.assertEqual(len(_lowerCamelCase				)    ,     _lowerCamelCase				)

                    self.assertListEqual(
                        list(self_attentions[0].shape[-3:]				)    ,     [self.model_tester.num_heads[0], window_size_squared, window_size_squared]    ,     )




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






      def  lowerCamelCase (      self		:  Optional[int]				)      ->		str:
             """simple docstring"""




             _lowerCamelCase :	str						=SwinaSRImageProcessor()
             _lowerCamelCase :	Any						=SwinaSRForImageSuperResolution.from_pretrained('caidas/swin2SR-classical-sr-x2-64'				).to(_lowerCamelCase				)

             _lowerCamelCase :	Optional[int]						=Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'				)
             _lowerCamelCase :	Dict						=processor(images=_lowerCamelCase    ,     return_tensors='pt'				).to(_lowerCamelCase				)

             # forward pass
             with torch.no_grad():
                    _lowerCamelCase :	Optional[int]						=model(**_lowerCamelCase				)

             # verify the logits
             _lowerCamelCase :	Tuple						=torch.Size([1, 3, 976, 1296]				)
             self.assertEqual(outputs.reconstruction.shape    ,     _lowerCamelCase				)
             _lowerCamelCase :	Optional[Any]						=torch.tensor(
                 [[0.5458, 0.5546, 0.5638], [0.5526, 0.5565, 0.5651], [0.5396, 0.5426, 0.5621]]				).to(_lowerCamelCase				)
             self.assertTrue(torch.allclose(outputs.reconstruction[0, 0, :3, :3]    ,     _lowerCamelCase    ,     atol=1E-4				)				)






import argparse
import pathlib

import fairseq
import torch
from fairseq.models.roberta import RobertaModel as FairseqRobertaModel
from fairseq.modules import TransformerSentenceEncoderLayer
from packaging import version

from transformers import RobertaConfig, RobertaForMaskedLM, RobertaForSequenceClassification
from transformers.models.bert.modeling_bert import (
    BertIntermediate,
    BertLayer,
    BertOutput,
    BertSelfAttention,
    BertSelfOutput,
)
from transformers.utils import logging


if version.parse(fairseq.__version__) < version.parse('0.9.0'):
 raise Exception('requires fairseq >= 0.9.0')


logging.set_verbosity_info()
lowerCamelCase		      = logging.get_logger(__name__)

lowerCamelCase		      = 'Hello world! cécé herlolip'




def 			a_   (					SCREAMING_SNAKE_CASE__      :   str	,    SCREAMING_SNAKE_CASE__      :   str	,    SCREAMING_SNAKE_CASE__      :   bool  ):
       '''simple docstring'''





       _lowerCamelCase :	Dict						=FairseqRobertaModel.from_pretrained(SCREAMING_SNAKE_CASE__  )
       roberta.eval()  # disable dropout
       _lowerCamelCase :	int						=roberta.model.encoder.sentence_encoder
       _lowerCamelCase :	Union[str, Any]						=RobertaConfig(
           vocab_size=roberta_sent_encoder.embed_tokens.num_embeddings	,    hidden_size=roberta.args.encoder_embed_dim	,    num_hidden_layers=roberta.args.encoder_layers	,    num_attention_heads=roberta.args.encoder_attention_heads	,    intermediate_size=roberta.args.encoder_ffn_embed_dim	,    max_position_embeddings=514	,    type_vocab_size=1	,    layer_norm_eps=1e-5	,    )
       if classification_head:
              _lowerCamelCase :	int						=roberta.model.classification_heads['mnli'].out_proj.weight.shape[0]
       print('Our BERT config:'	,    SCREAMING_SNAKE_CASE__  )

       _lowerCamelCase :	Optional[int]						=RobertaForSequenceClassification(SCREAMING_SNAKE_CASE__  ) if classification_head else RobertaForMaskedLM(SCREAMING_SNAKE_CASE__  )
       model.eval()

       # Now let's copy all the weights.
       # Embeddings
       _lowerCamelCase :	List[str]						=roberta_sent_encoder.embed_tokens.weight
       _lowerCamelCase :	int						=roberta_sent_encoder.embed_positions.weight
       _lowerCamelCase :	Tuple						=torch.zeros_like(
           model.roberta.embeddings.token_type_embeddings.weight  )  # just zero them out b/c RoBERTa doesn't use them.
       _lowerCamelCase :	Optional[Any]						=roberta_sent_encoder.emb_layer_norm.weight
       _lowerCamelCase :	int						=roberta_sent_encoder.emb_layer_norm.bias

       for i in range(config.num_hidden_layers  ):
              # Encoder: start of layer
              _lowerCamelCase :	BertLayer						=model.roberta.encoder.layer[i]
              _lowerCamelCase :	TransformerSentenceEncoderLayer						=roberta_sent_encoder.layers[i]

              # self attention
              _lowerCamelCase :	BertSelfAttention						=layer.attention.self
              assert (
                  roberta_layer.self_attn.k_proj.weight.data.shape
                  == roberta_layer.self_attn.q_proj.weight.data.shape
                  == roberta_layer.self_attn.v_proj.weight.data.shape
                  == torch.Size((config.hidden_size, config.hidden_size)  )
              )

              _lowerCamelCase :	Dict						=roberta_layer.self_attn.q_proj.weight
              _lowerCamelCase :	List[Any]						=roberta_layer.self_attn.q_proj.bias
              _lowerCamelCase :	Optional[Any]						=roberta_layer.self_attn.k_proj.weight
              _lowerCamelCase :	int						=roberta_layer.self_attn.k_proj.bias
              _lowerCamelCase :	Optional[Any]						=roberta_layer.self_attn.v_proj.weight
              _lowerCamelCase :	int						=roberta_layer.self_attn.v_proj.bias

              # self-attention output
              _lowerCamelCase :	BertSelfOutput						=layer.attention.output
              assert self_output.dense.weight.shape == roberta_layer.self_attn.out_proj.weight.shape
              _lowerCamelCase :	Union[str, Any]						=roberta_layer.self_attn.out_proj.weight
              _lowerCamelCase :	str						=roberta_layer.self_attn.out_proj.bias
              _lowerCamelCase :	List[Any]						=roberta_layer.self_attn_layer_norm.weight
              _lowerCamelCase :	List[Any]						=roberta_layer.self_attn_layer_norm.bias

              # intermediate
              _lowerCamelCase :	BertIntermediate						=layer.intermediate
              assert intermediate.dense.weight.shape == roberta_layer.fca.weight.shape
              _lowerCamelCase :	str						=roberta_layer.fca.weight
              _lowerCamelCase :	Optional[int]						=roberta_layer.fca.bias

              # output
              _lowerCamelCase :	BertOutput						=layer.output
              assert bert_output.dense.weight.shape == roberta_layer.fca.weight.shape
              _lowerCamelCase :	str						=roberta_layer.fca.weight
              _lowerCamelCase :	List[Any]						=roberta_layer.fca.bias
              _lowerCamelCase :	List[str]						=roberta_layer.final_layer_norm.weight
              _lowerCamelCase :	Optional[int]						=roberta_layer.final_layer_norm.bias
              # end of layer

       if classification_head:
              _lowerCamelCase :	Any						=roberta.model.classification_heads['mnli'].dense.weight
              _lowerCamelCase :	Optional[Any]						=roberta.model.classification_heads['mnli'].dense.bias
              _lowerCamelCase :	List[str]						=roberta.model.classification_heads['mnli'].out_proj.weight
              _lowerCamelCase :	Tuple						=roberta.model.classification_heads['mnli'].out_proj.bias
       else:
              # LM Head
              _lowerCamelCase :	Optional[Any]						=roberta.model.encoder.lm_head.dense.weight
              _lowerCamelCase :	Tuple						=roberta.model.encoder.lm_head.dense.bias
              _lowerCamelCase :	Tuple						=roberta.model.encoder.lm_head.layer_norm.weight
              _lowerCamelCase :	int						=roberta.model.encoder.lm_head.layer_norm.bias
              _lowerCamelCase :	Dict						=roberta.model.encoder.lm_head.weight
              _lowerCamelCase :	str						=roberta.model.encoder.lm_head.bias

       # Let's check that we get the same results.
       _lowerCamelCase :	torch.Tensor						=roberta.encode(SCREAMING_SNAKE_CASE__  ).unsqueeze(0  )  # batch of size 1

       _lowerCamelCase :	List[Any]						=model(SCREAMING_SNAKE_CASE__  )[0]
       if classification_head:
              _lowerCamelCase :	int						=roberta.model.classification_heads['mnli'](roberta.extract_features(SCREAMING_SNAKE_CASE__  )  )
       else:
              _lowerCamelCase :	int						=roberta.model(SCREAMING_SNAKE_CASE__  )[0]
       print(our_output.shape	,    their_output.shape  )
       _lowerCamelCase :	Any						=torch.max(torch.abs(our_output - their_output  )  ).item()
       print(F'''max_absolute_diff = {max_absolute_diff}'''  )  # ~ 1e-7
       _lowerCamelCase :	Optional[Any]						=torch.allclose(SCREAMING_SNAKE_CASE__	,    SCREAMING_SNAKE_CASE__	,    atol=1e-3  )
       print('Do both models output the same tensors?'	,    '🔥' if success else '💩'  )
       if not success:
              raise Exception('Something went wRoNg'  )

       pathlib.Path(SCREAMING_SNAKE_CASE__  ).mkdir(parents=SCREAMING_SNAKE_CASE__	,    exist_ok=SCREAMING_SNAKE_CASE__  )
       print(F'''Saving model to {pytorch_dump_folder_path}'''  )
       model.save_pretrained(SCREAMING_SNAKE_CASE__  )


if __name__ == "__main__":
 lowerCamelCase		      = argparse.ArgumentParser()
 # Required parameters
 parser.add_argument(
     '--roberta_checkpoint_path', default=None, type=str, required=True, help='Path the official PyTorch dump.'
 )
 parser.add_argument(
     '--pytorch_dump_folder_path', default=None, type=str, required=True, help='Path to the output PyTorch model.'
 )
 parser.add_argument(
     '--classification_head', action='store_true', help='Whether to convert a final classification head.'
 )
 lowerCamelCase		      = parser.parse_args()
 convert_roberta_checkpoint_to_pytorch(
     args.roberta_checkpoint_path, args.pytorch_dump_folder_path, args.classification_head
 )


