baidu-research / ba-dls-deepspeech

Apache License 2.0
486 stars 174 forks source link

Can I use the tensorflow backend? #19

Closed yyjjer closed 7 years ago

yyjjer commented 7 years ago

Hi, I want to use tensorflow-1.0 instead of theano as the backend, but get some errors.Could you please help me?

srvinay commented 7 years ago

You can use tensorflow, but right now the optimizer and loss function are setup as Theano ops. You will need to replace them with TF ops (tf.nn.ctc_loss, tf.train.MomentumOptimizer).

stan-sack commented 6 years ago

@srvinay what parameters do you pass to tf.nn.ctc_loss. Also, how do you apply updates when using tf.train.MomentumOptimizer?

I tried using tf.contrib.keras.optimizers.SGD but had difficulties converting labels to Sparse Tensors.

Should I be compiling a train function for each batch given that the label length will change and tf.nn.ctc_loss is based on label length?