
import argparse

import torch

from transformers import LxmertConfig, LxmertForPreTraining, load_tf_weights_in_lxmert
from transformers.utils import logging


logging.set_verbosity_info()


def       A       (					lowercase    ,       lowercase    ,       lowercase )   ->  str:
		'''simple docstring'''

		UpperCamelCase		=     LxmertConfig.from_json_file(__a )
		print(f'''Building PyTorch model from configuration: {config}''' )
		UpperCamelCase		=     LxmertForPreTraining(__a )

		# Load weights from tf checkpoint
		load_tf_weights_in_lxmert(__a    ,       __a    ,       __a )

		# Save pytorch-model
		print(f'''Save PyTorch model to {pytorch_dump_path}''' )
		torch.save(model.state_dict()    ,       __a )


if __name__ == "__main__":
					_UpperCAmelCase					: Union[str, Any]      =       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(
					    "--config_file",
					    default=None,
					    type=str,
					    required=True,
					    help="The config json file corresponding to the pre-trained model. \nThis specifies the model architecture.",
					)
					parser.add_argument(
					    "--pytorch_dump_path", default=None, type=str, required=True, help="Path to the output PyTorch model."
					)
					_UpperCAmelCase					: Union[str, Any]      =       parser.parse_args()
					convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.config_file, args.pytorch_dump_path)








"""simple docstring"""






from math import factorial



def 					_A			(__a = 20							) ->       int:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_      :  Dict    						=		2 * n  # middle entry of odd rows starting at row 3 is the solution for n = 1,
    # 2, 3,...
    SCREAMING_SNAKE_CASE_      :  List[str]    						=		n // 2

    return int(factorial(__a							) / (factorial(__a							) * factorial(n - k							))							)


if __name__ == "__main__":
  import sys

  if len(sys.argv) == 1:
    print(solution(20))
  else:
    try:
      UpperCAmelCase_   : List[str]   			= int(sys.argv[1])
      print(solution(n))
    except ValueError:
      print("""Invalid entry - please enter a number.""")


