Comments (16)
You can use this dataset, whose images have more than one digit and the number of digits differ from image to image. CTC may work better with this dataset.
from ctc_tensorflow_example.
I even don't know how to express my appreciation ! Thanks a lot.
from ctc_tensorflow_example.
I write just as your code tell me.And it works well if comment the CTC functions. I really don't know what's wrong with it .
from ctc_tensorflow_example.
Thank you @anxingle , I'm very glad that you liked my post. Answering your questions:
- Yes, you are absolute right, this is the default behavior of TensorFlow's implementation, but in Graves' thesis, he wrote that you have to delete the repeated labels and therefore remove the blank labels, as we can see at page 57 of his thesis. I don't have any clue why the Tensorflow team implemented in that way.
- I read your code, but it's better if you send to me your error log and your code with the CTC implementation (not as a comment), because in your code I didn't see the
seq_len
placeholder and the sparse placeholder fory
. Could you do that?
from ctc_tensorflow_example.
Thank you very much. I will do what you told me as soon as I can.
from ctc_tensorflow_example.
I add the entire code, and show me error.txt.
from ctc_tensorflow_example.
I tried tf.int64.
from ctc_tensorflow_example.
Could you send me your dataset?
from ctc_tensorflow_example.
I have push the mnist dataset into the data , you can just git clone the repository.
I am really grateful to you.
from ctc_tensorflow_example.
It takes almost 1 hours.Thanks GFW
from ctc_tensorflow_example.
Why are you trying to use CTC as a cost function? CTC is used when you don't have an alignment between your input and output and/or the output length vary along the samples. So, for one to one relationship (like one image one digit), CTC probably isn't the best solution for you. But, if you intend to use this code in a continuous hand writing recognition, CTC will work better. I'm looking your code and making some changes. As soon as possible I'll give you a feedback, ok?
from ctc_tensorflow_example.
Thank you for your reply. But in this code, I have 28 inputs, so it's a problem about many inputs( maybe laterly I'll add multi labels) maps to one label. My senior implement multi labels recognise framework mxnet warpctc and he told me it should be the best solution .
So nice !
from ctc_tensorflow_example.
Yes, but CTC works only for more than one label. I'll show you a working code, but I don't think that for this example CTC will outperform the softmax layer.
from ctc_tensorflow_example.
Got it! I change another dataset !
from ctc_tensorflow_example.
I made a working code and I put it on gist. You major issue was using the sparse place holder and the sequence length place holder. The targets required by CTC must not be encoded, you must provide as labels and you must feed the sparse place holder as a tuple of (indices, values, shape)
(that is generated by sparse_tuple_from); in the case for mnist, for batch you will have a target like
y = (
[[0, 0], [1, 0], [2, 0], ..., [batch_size-1, 0]],
[label_1, label_2, label_3, ..., label_batch_size],
[batch_size, 1]
)
And the seq_len
placeholder works to tell the run what is the size of each data in batch, but for MNIST, the network was feed with 28 inputs of length 28, so:
seq_len = [28 for _ in xrange(batch_size)]
I hope I could help you. If you have any question I'll be happy to answer you.
from ctc_tensorflow_example.
You're welcome. If you have any questions, please feel free to ask.
from ctc_tensorflow_example.
Related Issues (20)
- This project is not suitable for Tensorflow newst versions, like 0.12.1 and 1.0.0 HOT 1
- Save and restore problem HOT 4
- Normalization for multiple WAV inputs HOT 5
- Multiple Data HOT 2
- Multilayer problem HOT 5
- Saw a non-null label issue HOT 1
- urle error HOT 3
- [No issue] Thanks for this great work, it really helped in my work HOT 1
- when I run ctc_greedy_decoder function,how can I get the align information from all frames probability . HOT 1
- OCR: clarification about input and output HOT 3
- multi layer LSTM gives error HOT 1
- num_features HOT 1
- Input to sparse_tuple_from?
- BLSTM
- other way for increasing Batch size
- all possible alignments
- how to modify the connectionist Temporal Classification (CTC) layer of the network to also give us a confidence score?
- sth. about spare_tuple_from? HOT 1
- Regarding the output nodes of the model
- Bidirectional LSTM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctc_tensorflow_example.