

import json
import logging
import os
import random
import sys
from dataclasses import dataclass, field
from typing import Optional

import evaluate
import numpy as np
import torch
from datasets import load_dataset
from huggingface_hub import hf_hub_download
from PIL import Image
from torch import nn
from torchvision import transforms
from torchvision.transforms import functional

import transformers
from transformers import (
    AutoConfig,
    AutoImageProcessor,
    AutoModelForSemanticSegmentation,
    HfArgumentParser,
    Trainer,
    TrainingArguments,
    default_data_collator,
)
from transformers.trainer_utils import get_last_checkpoint
from transformers.utils import check_min_version, send_example_telemetry
from transformers.utils.versions import require_version
_SCREAMING_SNAKE_CASE							 =			logging.getLogger(__name__)

# Will error if the minimal version of Transformers is not installed. Remove at your own risks.
check_min_version('''4.31.0''')

require_version('''datasets>=2.0.0''', '''To fix: pip install -r examples/pytorch/semantic-segmentation/requirements.txt''')





def  _snake_case		(snake_case_					:     int    ,       snake_case_					:     Dict    ,       snake_case_					:     Optional[int]=0  )							->		Any:
  __UpperCAmelCase	:  List[str]		=     (size, size) if isinstance(snake_case_    ,       snake_case_  ) else size
  __UpperCAmelCase,			__UpperCAmelCase	:  Any		=     img.size
  __UpperCAmelCase	:  Optional[Any]		=     size[1] - original_height if original_height < size[1] else 0
  __UpperCAmelCase	:  List[Any]		=     size[0] - original_width if original_width < size[0] else 0
  __UpperCAmelCase	:  int		=     functional.pad(snake_case_    ,       (0, 0, pad_width, pad_height)    ,       fill=snake_case_  )
  return img


class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[Any]		=     transforms




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   for t in self.transforms:
     __UpperCAmelCase,			__UpperCAmelCase	:  Any		=     t(_UpperCAmelCase  ,  _UpperCAmelCase							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self							):
   pass




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Dict		=     size




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Dict		=     functional.resize(_UpperCAmelCase  ,  self.size							)
   __UpperCAmelCase	:  Any		=     functional.resize(_UpperCAmelCase  ,  self.size  ,  interpolation=transforms.InterpolationMode.NEAREST							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase=None							):
   __UpperCAmelCase	:  Optional[int]		=     min_size
   if max_size is None:
     __UpperCAmelCase	:  Optional[int]		=     min_size
   __UpperCAmelCase	:  Tuple		=     max_size




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Dict		=     random.randint(self.min_size  ,  self.max_size							)
   __UpperCAmelCase	:  List[Any]		=     functional.resize(_UpperCAmelCase  ,  _UpperCAmelCase							)
   __UpperCAmelCase	:  Union[str, Any]		=     functional.resize(_UpperCAmelCase  ,  _UpperCAmelCase  ,  interpolation=transforms.InterpolationMode.NEAREST							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[Any]		=     size if isinstance(_UpperCAmelCase  ,  _UpperCAmelCase							) else (size, size)




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[Any]		=     pad_if_smaller(_UpperCAmelCase  ,  self.size							)
   __UpperCAmelCase	:  str		=     pad_if_smaller(_UpperCAmelCase  ,  self.size  ,  fill=255							)
   __UpperCAmelCase	:  Tuple		=     transforms.RandomCrop.get_params(_UpperCAmelCase  ,  self.size							)
   __UpperCAmelCase	:  Optional[int]		=     functional.crop(_UpperCAmelCase  ,  *_UpperCAmelCase							)
   __UpperCAmelCase	:  Union[str, Any]		=     functional.crop(_UpperCAmelCase  ,  *_UpperCAmelCase							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[Any]		=     flip_prob




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   if random.random() < self.flip_prob:
     __UpperCAmelCase	:  Dict		=     functional.hflip(_UpperCAmelCase							)
     __UpperCAmelCase	:  Optional[Any]		=     functional.hflip(_UpperCAmelCase							)
   return image, target



class      lowerCamelCase_ :




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[Any]		=     functional.pil_to_tensor(_UpperCAmelCase							)
   __UpperCAmelCase	:  List[Any]		=     torch.as_tensor(np.array(_UpperCAmelCase							)  ,  dtype=torch.intaa							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  List[str]		=     dtype




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Tuple		=     functional.convert_image_dtype(_UpperCAmelCase  ,  self.dtype							)
   return image, target



class      lowerCamelCase_ :




 def __init__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[int]		=     mean
   __UpperCAmelCase	:  Optional[Any]		=     std




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   __UpperCAmelCase	:  Optional[int]		=     functional.normalize(_UpperCAmelCase  ,  mean=self.mean  ,  std=self.std							)
   return image, target



class      lowerCamelCase_ :




 def __call__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   if not isinstance(_UpperCAmelCase  ,  np.ndarray							):
     __UpperCAmelCase	:  Optional[int]		=     np.array(_UpperCAmelCase							).astype(np.uinta							)
   # avoid using underflow conversion
   __UpperCAmelCase	:  Optional[Any]		=     255
   __UpperCAmelCase	:  str		=     target - 1
   __UpperCAmelCase	:  Optional[int]		=     255

   __UpperCAmelCase	:  Optional[Any]		=     Image.fromarray(_UpperCAmelCase							)
   return image, target



@dataclass
class      lowerCamelCase_ :
 _lowerCAmelCase									=	field(
     default='''segments/sidewalk-semantic'''	,				metadata={
         '''help''': '''Name of a dataset from the hub (could be your own, possibly private dataset hosted on the hub).'''
     }	,				)
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={'''help''': '''The configuration name of the dataset to use (via the datasets library).'''})
 _lowerCAmelCase									=	field(
     default=0.15	,				metadata={'''help''': '''Percent to split off of train for validation.'''})
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={
         '''help''': (
             '''For debugging purposes or quicker training, truncate the number of training examples to this '''
             '''value if set.'''
         )
     }	,				)
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={
         '''help''': (
             '''For debugging purposes or quicker training, truncate the number of evaluation examples to this '''
             '''value if set.'''
         )
     }	,				)
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={'''help''': '''Whether or not to reduce all labels by 1 and replace background by 255.'''}	,				)




 def     a       (			self							):
   if self.dataset_name is None and (self.train_dir is None and self.validation_dir is None):
     raise ValueError(
         'You must specify either a dataset name from the hub or a train and/or validation directory.'							)



@dataclass
class      lowerCamelCase_ :
 _lowerCAmelCase									=	field(
     default='''nvidia/mit-b0'''	,				metadata={'''help''': '''Path to pretrained model or model identifier from huggingface.co/models'''}	,				)
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={'''help''': '''Pretrained config name or path if not the same as model_name'''})
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={'''help''': '''Where do you want to store the pretrained models downloaded from s3'''})
 _lowerCAmelCase									=	field(
     default='''main'''	,				metadata={'''help''': '''The specific model version to use (can be a branch name, tag name or commit id).'''}	,				)
 _lowerCAmelCase									=	field(default=_lowerCAmelCase	,				metadata={'''help''': '''Name or path of preprocessor config.'''})
 _lowerCAmelCase									=	field(
     default=_lowerCAmelCase	,				metadata={
         '''help''': (
             '''Will use the token generated when running `huggingface-cli login` (necessary to use this script '''
             '''with private models).'''
         )
     }	,				)





def  _snake_case		()							->		str:
  # See all possible arguments in src/transformers/training_args.py
  # or by passing the --help flag to this script.
  # We now keep distinct sets of args, for a cleaner separation of concerns.

  __UpperCAmelCase	:  str		=     HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments)  )
  if len(sys.argv  ) == 2 and sys.argv[1].endswith('.json'  ):
    # If we pass only one argument to the script and it's the path to a json file,
    # let's parse it to get our arguments.
    __UpperCAmelCase,			__UpperCAmelCase,			__UpperCAmelCase	:  Optional[Any]		=     parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]  )  )
  else:
    __UpperCAmelCase,			__UpperCAmelCase,			__UpperCAmelCase	:  Any		=     parser.parse_args_into_dataclasses()

  # Sending telemetry. Tracking the example usage helps us better allocate resources to maintain them. The
  # information sent is the one passed as arguments along with your Python/PyTorch versions.
  send_example_telemetry('run_semantic_segmentation'    ,       snake_case_    ,       snake_case_  )

  # Setup logging
  logging.basicConfig(
      format='%(asctime)s - %(levelname)s - %(name)s - %(message)s'    ,       datefmt='%m/%d/%Y %H:%M:%S'    ,       handlers=[logging.StreamHandler(sys.stdout  )]    ,       )

  if training_args.should_log:
    # The default of training_args.log_level is passive, so we set log level at info here to have that default.
    transformers.utils.logging.set_verbosity_info()

  __UpperCAmelCase	:  str		=     training_args.get_process_log_level()
  logger.setLevel(snake_case_  )
  transformers.utils.logging.set_verbosity(snake_case_  )
  transformers.utils.logging.enable_default_handler()
  transformers.utils.logging.enable_explicit_format()

  # Log on each process the small summary:
  logger.warning(
      F"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
      + F"distributed training: {bool(training_args.local_rank != -1  )}, 16-bits training: {training_args.fpaa}"  )
  logger.info(F"Training/evaluation parameters {training_args}"  )

  # Detecting last checkpoint.
  __UpperCAmelCase	:  Optional[Any]		=     None
  if os.path.isdir(training_args.output_dir  ) and training_args.do_train and not training_args.overwrite_output_dir:
    __UpperCAmelCase	:  Any		=     get_last_checkpoint(training_args.output_dir  )
    if last_checkpoint is None and len(os.listdir(training_args.output_dir  )  ) > 0:
      raise ValueError(
          F"Output directory ({training_args.output_dir}) already exists and is not empty. "
          'Use --overwrite_output_dir to overcome.'  )
    elif last_checkpoint is not None and training_args.resume_from_checkpoint is None:
      logger.info(
          F"Checkpoint detected, resuming training at {last_checkpoint}. To avoid this behavior, change "
          'the `--output_dir` or add `--overwrite_output_dir` to train from scratch.'  )

    # Load dataset
    # In distributed training, the load_dataset function guarantees that only one local process can concurrently
    # download the dataset.
    # TODO support datasets from local folders
  __UpperCAmelCase	:  Optional[int]		=     load_dataset(data_args.dataset_name    ,       cache_dir=model_args.cache_dir  )

  # Rename column names to standardized names (only "image" and "label" need to be present)
  if "pixel_values" in dataset["train"].column_names:
    __UpperCAmelCase	:  int		=     dataset.rename_columns({'pixel_values': 'image'}  )
  if "annotation" in dataset["train"].column_names:
    __UpperCAmelCase	:  Optional[int]		=     dataset.rename_columns({'annotation': 'label'}  )

  # If we don't have a validation split, split off a percentage of train as validation.
  __UpperCAmelCase	:  Tuple		=     None if 'validation' in dataset.keys() else data_args.train_val_split
  if isinstance(data_args.train_val_split    ,       snake_case_  ) and data_args.train_val_split > 0.0:
    __UpperCAmelCase	:  Optional[int]		=     dataset['train'].train_test_split(data_args.train_val_split  )
    __UpperCAmelCase	:  str		=     split['train']
    __UpperCAmelCase	:  int		=     split['test']

  # Prepare label mappings.
  # We'll include these in the model's config to get human readable labels in the Inference API.
  if data_args.dataset_name == "scene_parse_150":
    __UpperCAmelCase	:  List[Any]		=     'huggingface/label-files'
    __UpperCAmelCase	:  Optional[Any]		=     'ade20k-id2label.json'
  else:
    __UpperCAmelCase	:  Dict		=     data_args.dataset_name
    __UpperCAmelCase	:  str		=     'id2label.json'
  __UpperCAmelCase	:  Dict		=     json.load(open(hf_hub_download(snake_case_    ,       snake_case_    ,       repo_type='dataset'  )    ,       'r'  )  )
  __UpperCAmelCase	:  Any		=     {int(snake_case_  ): v for k, v in idalabel.items()}
  __UpperCAmelCase	:  Optional[Any]		=     {v: str(snake_case_  ) for k, v in idalabel.items()}

  # Load the mean IoU metric from the datasets package
  __UpperCAmelCase	:  Tuple		=     evaluate.load('mean_iou'  )

  # Define our compute_metrics function. It takes an `EvalPrediction` object (a namedtuple with a
  # predictions and label_ids field) and has to return a dictionary string to float.
  @torch.no_grad()
  def compute_metrics(snake_case_					:     List[Any]  ):
    __UpperCAmelCase,			__UpperCAmelCase	:  str		=     eval_pred
    __UpperCAmelCase	:  Any		=     torch.from_numpy(snake_case_  )
    # scale the logits to the size of the label
    __UpperCAmelCase	:  Dict		=     nn.functional.interpolate(
        snake_case_    ,       size=labels.shape[-2:]    ,       mode='bilinear'    ,       align_corners=snake_case_    ,       ).argmax(dim=1  )

    __UpperCAmelCase	:  Any		=     logits_tensor.detach().cpu().numpy()
    __UpperCAmelCase	:  List[Any]		=     metric.compute(
        predictions=snake_case_    ,       references=snake_case_    ,       num_labels=len(snake_case_  )    ,       ignore_index=0    ,       reduce_labels=image_processor.do_reduce_labels    ,       )
    # add per category metrics as individual key-value pairs
    __UpperCAmelCase	:  str		=     metrics.pop('per_category_accuracy'  ).tolist()
    __UpperCAmelCase	:  Dict		=     metrics.pop('per_category_iou'  ).tolist()

    metrics.update({F"accuracy_{idalabel[i]}": v for i, v in enumerate(snake_case_  )}  )
    metrics.update({F"iou_{idalabel[i]}": v for i, v in enumerate(snake_case_  )}  )

    return metrics

  __UpperCAmelCase	:  Optional[int]		=     AutoConfig.from_pretrained(
      model_args.config_name or model_args.model_name_or_path    ,       labelaid=snake_case_    ,       idalabel=snake_case_    ,       cache_dir=model_args.cache_dir    ,       revision=model_args.model_revision    ,       use_auth_token=True if model_args.use_auth_token else None    ,       )
  __UpperCAmelCase	:  Any		=     AutoModelForSemanticSegmentation.from_pretrained(
      model_args.model_name_or_path    ,       from_tf=bool('.ckpt' in model_args.model_name_or_path  )    ,       config=snake_case_    ,       cache_dir=model_args.cache_dir    ,       revision=model_args.model_revision    ,       use_auth_token=True if model_args.use_auth_token else None    ,       )
  __UpperCAmelCase	:  int		=     AutoImageProcessor.from_pretrained(
      model_args.image_processor_name or model_args.model_name_or_path    ,       cache_dir=model_args.cache_dir    ,       revision=model_args.model_revision    ,       use_auth_token=True if model_args.use_auth_token else None    ,       )

  # Define torchvision transforms to be applied to each image + target.
  # Not that straightforward in torchvision: https://github.com/pytorch/vision/issues/9
  # Currently based on official torchvision references: https://github.com/pytorch/vision/blob/main/references/segmentation/transforms.py
  if "shortest_edge" in image_processor.size:
    # We instead set the target size as (shortest_edge, shortest_edge) to here to ensure all images are batchable.
    __UpperCAmelCase	:  Optional[int]		=     (image_processor.size['shortest_edge'], image_processor.size['shortest_edge'])
  else:
    __UpperCAmelCase	:  Optional[Any]		=     (image_processor.size['height'], image_processor.size['width'])
  __UpperCAmelCase	:  Optional[int]		=     Compose(
      [
          ReduceLabels() if data_args.reduce_labels else Identity(),
          RandomCrop(size=snake_case_  ),
          RandomHorizontalFlip(flip_prob=0.5  ),
          PILToTensor(),
          ConvertImageDtype(torch.float  ),
          Normalize(mean=image_processor.image_mean    ,       std=image_processor.image_std  ),
      ]  )
  # Define torchvision transform to be applied to each image.
  # jitter = ColorJitter(brightness=0.25, contrast=0.25, saturation=0.25, hue=0.1)
  __UpperCAmelCase	:  int		=     Compose(
      [
          ReduceLabels() if data_args.reduce_labels else Identity(),
          Resize(size=snake_case_  ),
          PILToTensor(),
          ConvertImageDtype(torch.float  ),
          Normalize(mean=image_processor.image_mean    ,       std=image_processor.image_std  ),
      ]  )

  def preprocess_train(snake_case_					:     List[Any]  ):
    __UpperCAmelCase	:  Any		=     []
    __UpperCAmelCase	:  int		=     []
    for image, target in zip(example_batch['image']    ,       example_batch['label']  ):
      __UpperCAmelCase,			__UpperCAmelCase	:  Any		=     train_transforms(image.convert('RGB'  )    ,       snake_case_  )
      pixel_values.append(snake_case_  )
      labels.append(snake_case_  )

    __UpperCAmelCase	:  Union[str, Any]		=     {}
    __UpperCAmelCase	:  Optional[int]		=     torch.stack(snake_case_  )
    __UpperCAmelCase	:  Tuple		=     torch.stack(snake_case_  )

    return encoding

  def preprocess_val(snake_case_					:     Tuple  ):
    __UpperCAmelCase	:  Tuple		=     []
    __UpperCAmelCase	:  Tuple		=     []
    for image, target in zip(example_batch['image']    ,       example_batch['label']  ):
      __UpperCAmelCase,			__UpperCAmelCase	:  Optional[Any]		=     val_transforms(image.convert('RGB'  )    ,       snake_case_  )
      pixel_values.append(snake_case_  )
      labels.append(snake_case_  )

    __UpperCAmelCase	:  Optional[int]		=     {}
    __UpperCAmelCase	:  str		=     torch.stack(snake_case_  )
    __UpperCAmelCase	:  int		=     torch.stack(snake_case_  )

    return encoding

  if training_args.do_train:
    if "train" not in dataset:
      raise ValueError('--do_train requires a train dataset'  )
    if data_args.max_train_samples is not None:
      __UpperCAmelCase	:  List[str]		=     (
          dataset['train'].shuffle(seed=training_args.seed  ).select(range(data_args.max_train_samples  )  )
      )
    # Set the training transforms
    dataset["train"].set_transform(snake_case_  )

  if training_args.do_eval:
    if "validation" not in dataset:
      raise ValueError('--do_eval requires a validation dataset'  )
    if data_args.max_eval_samples is not None:
      __UpperCAmelCase	:  Any		=     (
          dataset['validation'].shuffle(seed=training_args.seed  ).select(range(data_args.max_eval_samples  )  )
      )
    # Set the validation transforms
    dataset["validation"].set_transform(snake_case_  )

  # Initalize our trainer
  __UpperCAmelCase	:  Optional[int]		=     Trainer(
      model=snake_case_    ,       args=snake_case_    ,       train_dataset=dataset['train'] if training_args.do_train else None    ,       eval_dataset=dataset['validation'] if training_args.do_eval else None    ,       compute_metrics=snake_case_    ,       tokenizer=snake_case_    ,       data_collator=snake_case_    ,       )

  # Training
  if training_args.do_train:
    __UpperCAmelCase	:  int		=     None
    if training_args.resume_from_checkpoint is not None:
      __UpperCAmelCase	:  Tuple		=     training_args.resume_from_checkpoint
    elif last_checkpoint is not None:
      __UpperCAmelCase	:  List[str]		=     last_checkpoint
    __UpperCAmelCase	:  Any		=     trainer.train(resume_from_checkpoint=snake_case_  )
    trainer.save_model()
    trainer.log_metrics('train'    ,       train_result.metrics  )
    trainer.save_metrics('train'    ,       train_result.metrics  )
    trainer.save_state()

  # Evaluation
  if training_args.do_eval:
    __UpperCAmelCase	:  Optional[int]		=     trainer.evaluate()
    trainer.log_metrics('eval'    ,       snake_case_  )
    trainer.save_metrics('eval'    ,       snake_case_  )

  # Write model card and (optionally) push to hub
  __UpperCAmelCase	:  str		=     {
      'finetuned_from': model_args.model_name_or_path,
      'dataset': data_args.dataset_name,
      'tags': ['image-segmentation', 'vision'],
  }
  if training_args.push_to_hub:
    trainer.push_to_hub(**snake_case_  )
  else:
    trainer.create_model_card(**snake_case_  )


if __name__ == "__main__":
      main()










import argparse

import torch

from transformers import RoFormerConfig, RoFormerForMaskedLM, load_tf_weights_in_roformer
from transformers.utils import logging


logging.set_verbosity_info()





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					lowercase						   =       RoFormerConfig.from_json_file(_UpperCAmelCase				)
					print(f"""Building PyTorch model from configuration: {config}"""				)
					lowercase						   =       RoFormerForMaskedLM(_UpperCAmelCase				)

					# Load weights from tf checkpoint
					load_tf_weights_in_roformer(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				)

					# Save pytorch-model
					print(f"""Save PyTorch model to {pytorch_dump_path}"""				)
					torch.save(model.state_dict()       ,			_UpperCAmelCase       ,			_use_new_zipfile_serialization=_UpperCAmelCase				)


if __name__ == "__main__":
		__magic_name__       =     argparse.ArgumentParser()
		# Required parameters
		parser.add_argument(
		    '''--tf_checkpoint_path''', default=None, type=str, required=True, help='''Path to the TensorFlow checkpoint path.'''
		)
		parser.add_argument(
		    '''--bert_config_file''',
		    default=None,
		    type=str,
		    required=True,
		    help=(
		        '''The config json file corresponding to the pre-trained BERT model. \n'''
		        '''This specifies the model architecture.'''
		    ),
		)
		parser.add_argument(
		    '''--pytorch_dump_path''', default=None, type=str, required=True, help='''Path to the output PyTorch model.'''
		)
		__magic_name__       =     parser.parse_args()
		convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)






