I have used ONNX[Open Neural Network Exchange] to convert the PyTorch model to Tensorflow.
ONNX is an open format built to represent machine learning models. ONNX defines a common set of operators - the building blocks of machine learning and deep learning models - and a common file format to enable AI developers to use models with a variety of frameworks, tools, runtimes, and compilers.
You can find the more details about onnx here: https://onnx.ai/