DeepSpeech icon indicating copy to clipboard operation
DeepSpeech copied to clipboard

Run code with warp-ctc

Open kdavis-mozilla opened this issue 9 years ago • 13 comments

As the current code is relatively stable, we should re-introduce warp-ctc for a performance boost.

kdavis-mozilla avatar Feb 06 '17 06:02 kdavis-mozilla

But warp-ctc is not working. Can you confirm this?

striki70 avatar Feb 14 '17 08:02 striki70

Our fork of tensorflow contains a branch with warp-ctc integrated[1].

This branch has worked in the past. I'd assume it works now.

However, over the last couple of weeks we've had server problems and switched back to release versions of tensorflow to eliminate one variable from our debug work. Once the debug work is done we'll switch back to tensorflow with warp-ctc for a performance boost.

kdavis-mozilla avatar Feb 14 '17 09:02 kdavis-mozilla

Does version that is currently available work properly with warp-ctc?

striki70 avatar Mar 07 '17 10:03 striki70

@striki70 We haven't tested it recently. But it should work.

We have a TensorFlow fork/branch v1.0.0-warpctc that has warp-ctc integrated in to TensorFlow.

In addition we have a flag use_warpctc that can be used make our code use warp-ctc.

One can turn on the flag and test.

kdavis-mozilla avatar Mar 07 '17 10:03 kdavis-mozilla

No it doesn't work: Traceback (most recent call last): ... total_loss = tf.contrib.warpctc.warp_ctc_loss(labels=batch_y, inputs=logits, sequence_length=batch_seq_len) AttributeError: 'module' object has no attribute 'warpctc'

striki70 avatar Mar 07 '17 13:03 striki70

Are you using a tensorflow version compiled from the fork/branch v1.0.0-warpctc?

kdavis-mozilla avatar Mar 07 '17 13:03 kdavis-mozilla

According to installation instructions installing this is done by pip install tensorflow-gpu, and I did that already.

On Tuesday, March 7, 2017 2:41 PM, Kelly Davis <[email protected]> wrote:

Are you using a tensorflow version compiled from the fork/branch v1.0.0-warpctc?— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

striki70 avatar Mar 07 '17 16:03 striki70

The installation instructions are for the standard use case, using the ctc algorithm that's part of Tensorflow not using the warp-ctc ctc algorithm.

Using warp-ctc is special, as it's not part of TensorFlow. So, to use it one has to use our fork/branch v1.0.0-warpctc of Tensorflow which has the warp-ctc ctc algorithm integrated.

We did not include instructions for using the warp-ctc ctc algorithm as its experimental and much more difficult to install, one has to compile Tensorflow from source. We wanted the instructions to be as simply as possible, to get people up and running with no friction.

kdavis-mozilla avatar Mar 07 '17 16:03 kdavis-mozilla

Moreover, this is documented in README.Mozilla.md: https://github.com/mozilla/tensorflow/blob/v1.0.0-warpctc/README.Mozilla.md#taskcluster-built-pip-packages

Please note that I ran into strange segfault sometimes when using the package (problem I did not face with previous builds of master), and I had no time to investigate why so far.

lissyx avatar Mar 07 '17 16:03 lissyx

It looks like my doc is broken, proper direct link for v1.0.0 should be: https://tools.taskcluster.net/index/artifacts/#project.deepspeech.tensorflow.pip.v1.0.0-warpctc/project.deepspeech.tensorflow.pip.v1.0.0-warpctc.gpu

lissyx avatar Mar 07 '17 16:03 lissyx

That worked. Thnx for support.

striki70 avatar Mar 08 '17 07:03 striki70

Welcome

kdavis-mozilla avatar Mar 08 '17 08:03 kdavis-mozilla

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 03 '19 19:01 lock[bot]