PositionEncoder

class PositionEncoder(config, max_index)[source]

Encodes the position information into vectors

There are 2 pieces of information that goes into the encoded information: 1. Word Embedding 2. Position Embedding

forward(src_seq)[source]

Encodes input according to position (The position encoding is based on the time stamp)

Arg:

src_seq: Sequence to encode.

Returns

Encoded features.

Return type

encoded_pos_features