Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding
Project description
Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding
Implementation of Learnable Fourier Features for Multi-Dimensional Spatial Positional Encoding by Li, Si, Li, Hsieh and Bengio.
Installation
pip install learnable_fourier_positional_encoding
Usage
import torch
from learnable_fourier_positional_encoding import LearnableFourierPositionalEncoding
G = 3
M = 17
x = torch.randn((97, G, M))
enc = LearnableFourierPositionalEncoding(G, M, 768, 32, 768, 10)
pex = enc(x)
print(pex.shape)
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
File details
Details for the file learnable_fourier_positional_encoding-0.0.1.tar.gz
.
File metadata
- Download URL: learnable_fourier_positional_encoding-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc08dc6c03f1bf13f88d35aa5b8dc6c38151d18e79bc93d317adae9d16991807 |
|
MD5 | 6a6389fbd8db1dee202ddb46478853f4 |
|
BLAKE2b-256 | 6e60f322f3641bf7fe13b23766aaf2ad8fdb148484e8d5f3518cca29b92f7da9 |
File details
Details for the file learnable_fourier_positional_encoding-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: learnable_fourier_positional_encoding-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f25d940503a5d09f3b586ebb1e6f04482e196b50a6634f4ba8d4698b366db59a |
|
MD5 | 35dd32e89e3290a18cbe866dee98b186 |
|
BLAKE2b-256 | 7e0afdcad57606973e15f5b499473515a476cda6908e8ee335dfa8ca3c6a882c |