Read Keras model weights from .h5 file and initialize Pytorch model with the weights. Write Pytorch model into .pt file.
The code needs to be modified to your purpose.
- Add your Pytorch network and import it to the file.
- Read Keras model properly: define model file name and add needed custom objects to 'load_model' function.