Exchange weights between PyTorch and TensorFlow/Keras
mainUse the weight-exchange utility to move weights between torch and tensorflow.keras modules via an intermediate NumPy format.
To work with PyTorch weights, import exchange.torch.
To work with TensorFlow weights, import exchange.tf.
Note that import exchange does not automatically import these submodules, allowing you to use the library without having both PyTorch and TensorFlow installed in the same environment simultaneously.