Skip to content

Deep learning layers

EDS-PDF provides a set of deep learning layers that can be used to build trainable components. These layers are built on top of the PyTorch framework and can be used in any PyTorch model.

Layer Description
box-embedding High level layer combining multiple box embedding layers together
box-layout-embedding Embeds the layout features (x/y/w/h) features of a box
box-text-embedding Embeds the textual features (shape/prefix/suffix) features of a box
box-layout-preprocessor Performs common preprocessing of box layout features to be used / shared by other components
box-transformer Contextualize box embeddings with a 2d Transformer with relative position representations
cnn-pooler A pytorch component that aggregates its inputs by running convolution and max-pooling ops
relative-attention A 2d attention layer that optionally uses relative position to compute its attention scores
sinusoidal-embedding A position embedding that uses trigonometric functions to encode positions
vocabulary A non deep learning layer to encodes / decode vocabularies