I'm looking to encode PDF documents for deep learning such that an image representation of the PDF refers to word embeddings instead of graphic data
So I've indexed a relatively small vocabulary (88 words). I've generated images that replace graphic data with word indexed (1=cat, 2=dog, etc) data. Now I'm going to my NN model
right_input = Input((width, height, 1), name='right_input') right = Flatten()(right_input) right = Embedding(wordspaceCount, embeddingDepth)(right) right = Reshape((width, height, embeddingDepth))(right) right = vgg16_model((width, height, embeddingDepth))(right)
Image data is positive-only and embedding outputs negative values though so I'm wondering if it is necessary to normalize the embedding layer with something like this after the
right = Lambda(lambda x: (x + 1.)/2.)(right)
The word indexed image looks like this:
Also, is this a problematic concept generally?