emedvedev / attention-ocr

A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
MIT License
1.08k stars 256 forks source link

Target Embedding Size explanation #153

Closed mikylucky closed 5 years ago

mikylucky commented 5 years ago

Hi, can someone explain me what's the embedding_size parameter used for? I cannot understand what is "Embedding Size".

Thanks!

parmarsuraj99 commented 5 years ago

It's like converting CNN feature maps into a dense representation which can then be fed to Attention mechanism. In NLP, we convert sentences into numbers using vector representations for each word, with/without context(these are called word embeddings). which are later used as an input (representing a sentence) to a model. https://machinelearningmastery.com/what-are-word-embeddings/

These(embeddings) can be learned while training. We usually choose the dimensions for embeddings. so here, embedding_size represents the dimensions of vector which will be used to map CNN feature maps to a denser vector.

mikylucky commented 5 years ago

Nice explanation, thanks!