SinusoidalPositionEncoder

class opennmt.layers.SinusoidalPositionEncoder(*args, **kwargs)[source]

Encodes positions with sine waves as described in https://arxiv.org/abs/1706.03762.

Inherits from: opennmt.layers.PositionEncoder