pytorch-kaldi icon indicating copy to clipboard operation
pytorch-kaldi copied to clipboard

How can I load a trained model in python with torch?

Open sun-peach opened this issue 5 years ago • 2 comments

Hi, I have followed the librispeech cfg to train a model. Now I would like to load it in python code with torch. I will use it as a pretrained module within a complex system. Do you have any tutorial to do that? Thank you.

sun-peach avatar Jul 14 '20 23:07 sun-peach

The .pkl that is saved is pretty standard ! You can load it with torch.load()

TParcollet avatar Jul 23 '20 14:07 TParcollet

Thank you. Will it save the intermediate model somewhere? I make it run 15 epochs, while I don't see any .pkl files in the corresponding model directory (I set the out_folder in the config file) during training (currently, it has run 9 epochs). Should I just wait until it finish all the epochs?

sun-peach avatar Jul 26 '20 20:07 sun-peach