Skip to main content

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


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

File hashes

Hashes for learnable_fourier_positional_encoding-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fc08dc6c03f1bf13f88d35aa5b8dc6c38151d18e79bc93d317adae9d16991807
MD5 6a6389fbd8db1dee202ddb46478853f4
BLAKE2b-256 6e60f322f3641bf7fe13b23766aaf2ad8fdb148484e8d5f3518cca29b92f7da9

See more details on using hashes here.

File details

Details for the file learnable_fourier_positional_encoding-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for learnable_fourier_positional_encoding-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f25d940503a5d09f3b586ebb1e6f04482e196b50a6634f4ba8d4698b366db59a
MD5 35dd32e89e3290a18cbe866dee98b186
BLAKE2b-256 7e0afdcad57606973e15f5b499473515a476cda6908e8ee335dfa8ca3c6a882c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page