Trying to understand implementation details of lstm.py

282 views
Skip to first unread message

sudeep raja putta

unread,
May 19, 2014, 7:43:10 AM5/19/14
to ocr...@googlegroups.com
I am trying to understand and reverse engineer LSTM in lstm.py. But there are many attributes with cryptic names

What do the following names represent?

WGI WGF WGO WIP WFP WOP cix ci gix gi gox go gfx gf
source state output gierr gferr goerr cierr stateerr

Dan Vanderkam

unread,
Jan 14, 2015, 5:12:40 PM1/14/15
to ocr...@googlegroups.com
You might enjoy reading this implementation of LSTM, it has longer variable names:

I believe WGI = Weight of Input Gate, for example.

Ajinkya Kulkarni

unread,
Mar 4, 2015, 5:58:30 AM3/4/15
to ocr...@googlegroups.com
I read the thesis by Alex graves on RNN LSTM CTC, and currently I am studying lstm.py and i ran code for training english alphabets for OCR purpose !!! 

My query is with regards to implementation of CTC layer and decoding algorithm such as prefix decoding or token passing algorithm as specified by Thesis paper 

I am unable to locate decoding part in lstm.py !!!!
Any information regards to this will be helpful  
Message has been deleted

Tom Morris

unread,
Feb 18, 2016, 12:11:10 PM2/18/16
to ocr...@googlegroups.com
On Thu, Feb 18, 2016 at 7:11 AM, abhay sharma <abha...@gmail.com> wrote:
http://cse.iitkgp.ac.in/~psraja/Report/HowToUse.html

View explanation.pdf from this link.

That PDF and the associated code is also available from this Github repo:


Tom
 
On Monday, May 19, 2014 at 5:13:10 PM UTC+5:30, sudeep raja putta wrote:

Sachin Garg

unread,
Feb 19, 2016, 2:25:56 AM2/19/16
to ocr...@googlegroups.com
Hi,

Thanks for that.

A quick question about the test.txt file (step 2). The file has:

TAG:0010/0001_1#1
TRUTH:0c0f 0c26 0c3f 
FEATURE:1 15 23 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 ...

As I understand, the "TAG" is an identifier, while the "TRUTH" is the unicode sequence. 
Can you please tell me how to get the "FEATURE" part?

Thanks,
Sachin
On Thursday 18 February 2016 07:11 AM, abhay sharma wrote:
http://cse.iitkgp.ac.in/~psraja/Report/HowToUse.html

View explanation.pdf from this link.

On Monday, May 19, 2014 at 5:13:10 PM UTC+5:30, sudeep raja putta wrote:
--
You received this message because you are subscribed to the Google Groups "ocropus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocropus+u...@googlegroups.com.
To post to this group, send email to ocr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ocropus/714b0580-c818-4c7f-8312-bb57744e251f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sudeep raja putta

unread,
Feb 19, 2016, 7:54:00 AM2/19/16
to ocr...@googlegroups.com
Hi, 
See the get_data function here:

Ignore the first number, it is for some kind of book keeping
The second number is the size of the feature for each timestep. So 15 must be the number of input cell in the LSTM
The third number is the number of timesteps.

The first 15 numbers after that will be input feature for timestep 1
Next 15 numbers after that will be input feature for timestep 2 and so on for 23 timesteps.
You can verify this by seeing that the number of 1s and 0s is 15*23

It is good to see interest in my code after almost 2 years. I hadn't revisited it after completing my internship. I might just spend some time one day and document everything properly. But my suggestion is to try libraries like keras etc.

Regards,
Sudeep

--
You received this message because you are subscribed to a topic in the Google Groups "ocropus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ocropus/GO_XBDbiR3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ocropus+u...@googlegroups.com.

To post to this group, send email to ocr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages