TypeError: 'sess' must be a Session;

I followed this(https://help.github.com/articles/installing-git-large-file-storage/) in the begging as it was mentioned in Prerequisites of readme.md in mozilla/DeepSpeech .

but I end up with this after training for a long time.

TypeError: ‘sess’ must be a Session; <tensorflow.python.training.monitored_session.MonitoredSession object at 0x7f3ac2879b10>

I also see some suggestion in github issue tracker for this issue.

https://github.com/mozilla/DeepSpeech/issues/662

but I am still standing with this error.
any suggestions ?

Thanks :slight_smile:

@meghagowda5193 Can you provide us the full log of the error ?

@lissyx , I restarted the process with the same command, and not I don’t see that error. Bellow is my command for training.

python -u DeepSpeech.py
–checkpoint_dir checkpoint
–checkpoint_step 1
–dropout_rate 0.2367
–default_stddev 0.046875
–epoch 13
–export_dir /my_exportdir/model.pb
–initialize_from_frozen_model models/output_graph.pb
–learning_rate 0.0001
–train_files CVD/cv-valid-train.csv,CVD/cv-other-train.csv
–dev_files CVD/cv-valid-dev.csv
–test_files CVD/cv-valid-test.csv
–train_batch_size 12
–dev_batch_size 8
–test_batch_size 8
–display_step 0
–validation_step 1
–log_level 0
–summary_dir summary3
–summary_secs 60

As I am using checkpoint, I believe every time I start the training, it is continuing from that point. But I get the below message in between the training. Can you tell me if its just a warning or any thing wrong in the process.

D Starting batch…
2018-03-26 11:26:10.350260: W tensorflow/core/util/ctc/ctc_loss_calculator.cc:144]No valid path found.
D Finished batch step 104690.
D Sending Job (ID: 84, worker: 0, epoch: 3, set_name: train)…
D Computing Job (ID: 85, worker: 0, epoch: 3, set_name: train)…
D Starting batch…
D Finished batch step 104691.
D Sending Job (ID: 85, worker: 0, epoch: 3, set_name: train)…
D Computing Job (ID: 86, worker: 0, epoch: 3, set_name: train)…
D Starting batch…
D Finished batch step 104692.
D Sending Job (ID: 86, worker: 0, epoch: 3, set_name: train)…
D Computing Job (ID: 87, worker: 0, epoch: 3, set_name: train)…

Thank you :slight_smile:

It’s not an error, just a warning, as you can deduce from the ‘W’. As much as I remember, it’s happening in the begining with CTC but it should not happen too much after.

@lissyx , Okay thank you. but I am little confused with the model usage. could you please clarify it.

  1. Once my training is finished, I will be using the model which I trained. now to create the transcripts, will I be using the same command as below?

deepspeech models/output_graph.pb my_audio_file.wav models/alphabet.txt models/lm.binary models/trie

  1. Training my model means I am making the leaning for the existing model. Is my assumption correct ?
  2. In my case , I want to create the transcripts for the audio songs. Till now I have written the script for the conversion as below. if its useful for some 1 please refer the below code

print ’ converting mp4 to wav file’
from pydub import AudioSegment
print 'mp4 file data before conversion’
sound = AudioSegment.from_file(“a.mp4”,format = “mp4”)
print "channels(mono :1, streo:2 )= ", sound.channels,"Frequency in Hz= ",sound.frame_rate,"bits(1: 8bit, 2: 16bit) = ", sound.sample_width
new_sound = sound.set_frame_rate(16000).set_channels(1)
new_sound.export(“a.wav”,format=“wav”)
print 'wav file data after conversion’
print "channels(mono :1, streo:2 )= ", new_sound.channels,"Frequency in Hz= ",new_sound.frame_rate,"bits(1: 8bit, 2: 16bit) = ", new_sound.sample_width

But I am afraid about the background music in the songs. Any comments on that please?

Thanks, :slight_smile:

I don’t get your point.

I also don’t understand what you mean there: you are mixing training and existing model, I’m not sure what it is you want exactly.

Your script is barely readable, I don’t understand what it does.

You have one audio file that is music + song ? If so, yes, the background music will be noise that makes it harder.