Question about how to make a prediction


(kirill) #1

Hello everyone!
I have a quite noob question.
I train deepspeech model on gpu, checkpoints are saved to the folder ‘checkpoints’.
If I interrupt a training process, how can I use checkpoints of model to make predictions?
For example, I want to see what model predicts to some wav-file.
I need to generate csv-file which describes this wav-file? And how to check a model?

Thanks a lot for your attention, I will appreciate any help or link.


(Yv) #2

Haven’t tried it myself but you can look inside DeepSpeech.py, there’s an option “one_shot_infer” which should allow what you are looking for.

Alternatively, if you have specified the export_dir during your training, the pb model that has been generated can be used with the deepspeech-gpu command line utility that can be installed using pip.

pip install deepspeech-gpu
deepspeech-gpu models/output_graph.pb my_audio_file.wav models/alphabet.txt

(Lissyx) #3

That’s correct, and if you keep the checkpoint dir, you should be able to restart from the last epoch you stopped it.


(kirill) #4

Thanks a lot! :slight_smile:
I Need to pay more attention to the source code and comments!