MCPcopy Create free account
hub / github.com/dailenson/SDT / PositionalEncoding

Class PositionalEncoding

models/transformer.py:296–339  ·  view source on GitHub ↗

Sinusoidal positional encoding for non-recurrent neural networks. Implementation based on "Attention Is All You Need" :cite:`DBLP:journals/corr/VaswaniSPUJGKP17` Args: dropout (float): dropout parameter dim (int): embedding size

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected