mpezeshki / CTC-Connectionist-Temporal-Classification

Theano implementation of CTC.
Apache License 2.0
74 stars 26 forks source link

How to test pbrakels's version CTC? #2

Open lifelongeek opened 9 years ago

lifelongeek commented 9 years ago

Hi all !

I am planning to merge CTC with KALDI for building end-to-end speech recognition system. First of all, thanks for providing CTC as open source. I attribute yours in my future source code.

I first visited mohammadpz's page to download and test the code with toy-example. But there is error related to type casting as Søren had before :

TypeError: expected type_num 7 (NPY_INT64) got 12 Apply node that caused the error: Elemwise{Add}[(0, 1)](Viterbi, shared_Viterbi) Inputs types: [TensorType(int64, vector), TensorType(int64, vector)] Inputs shapes: [(0,), (10,)] Inputs strides: [(8,), (8,)] Inputs values: [array([], dtype=float64), 'not shown']

It seems that there are type casting error as well as zero vector error .)

Unfortunately, THEANO_FLAGS='floatX=float64' does not change any result.

So I came here(@pbrakels) to test code, where it seems to be more recent code.

I have two question regarding this. Q1) Any other solution for solving above error? Q2) Is there any other code to test @pbrakel 's?

Thank you

Best regards,

Ken Kim

pbrakel commented 9 years ago

Hey Ken Kim,

I'm not sure about the error you got with Mohammad's example. It could be an issue related to the latest versions of blocks and fuel. I will have a look at this when I find the time but perhaps @mohammadpz can help you directly.

It seems the code Søren posted (including the correction in the last post) in the discussion about https://github.com/mohammadpz/CTC-Connectionist-Temporal-Classification/issues/1 would be a good starting point for my version of the code. You can also have a look at the test code for the pseudo_cost function.

Since this repo is getting attention sooner than I expected, I'll free up some time to add a proper example for my version this week and see if it's still compatible with the latest versions of blocks and fuel.

Best, Philemon

ps. I'm not sure if Mohammad wants to have my version of the code on his master branch as well so perhaps we should close this PR and continue the discussion in a new issue instead.

mpezeshki commented 9 years ago

Hey @gmkim90 ,

Thanks for your interest. Today I tried to fixed the error, but it seems that there's something wrong with optimizations which is due to the new version of Blocks. I'll try to clean up the code tonight by applying @pbrakel's changes and bringing them to the master branch.

huili03855 commented 8 years ago

Hi, all. I have the same problem as Kim. Has the Q1 problem solved or not? How to fix it?

Thanks

mpezeshki commented 8 years ago

Hi @huili03855 ,

Unfortunately we haven't address this issue yet just because of lack of time. I presume it shouldn't be that hard to fix this problem. Instead you may use this: https://github.com/skaae/Lasagne-CTC