1D, 2D, and 3D Sinusodal Positional Encodings in PyTorch
Project description
1D, 2D, and 3D Sinusodal Postional Encoding Pytorch
This is an implemenation of 1D, 2D, and 3D sinusodal positional encoding, being able to encode on tensors of the form (batchsize, x, ch), (batchsize, x, y, ch), and (batchsize, x, y, z, ch), where the positional encodings will be added to the ch dimension. The Attention is All You Need allowed for positional encoding in only one dimension, however, this works to extend this to 2 and 3 dimensions.
To install, simply run:
pip install positional-encodings
For more information, check out the github page.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file positional_encodings-1.0.5.tar.gz.
File metadata
- Download URL: positional_encodings-1.0.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740d7b5dcb14753cc5d81b6791488c9bbee23950b475c1f202032f6fa3e2f6c5
|
|
| MD5 |
b4f49097989047acda71849e74ec5d69
|
|
| BLAKE2b-256 |
790430e2e3f4d990248671a015ecc68694623f807ef57234a7ec13527a87ea2a
|
File details
Details for the file positional_encodings-1.0.5-py3-none-any.whl.
File metadata
- Download URL: positional_encodings-1.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a3e8e6d0706e0d08edfa119690f3df2a4aa25443c3bb539e471711d14cfbca
|
|
| MD5 |
a4332f5ff5d619c9f529928464253947
|
|
| BLAKE2b-256 |
c301180cf5e0c9da1f800754241f7b3d0e9f9f58fd52c5b7c9a6afaa98f33b85
|