Skip to main content

Another attention variant

Project description

kl-div-attention (wip)

Just another attention variant, for testing Gitlab

Install

$ pip install kl-div-attention

Usage

import torch
from kl_div_attention import KLDivAttention

attn = KLDivAttention(dim = 512)
tokens = torch.randn(1, 1024, 512)

assert attn(tokens).shape == tokens.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

kl_div_attention-0.0.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kl_div_attention-0.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file kl_div_attention-0.0.3.tar.gz.

File metadata

  • Download URL: kl_div_attention-0.0.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for kl_div_attention-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bd391950696c362852d210fafe61a95a5e3a64afdf023b6877e67bd744359b4f
MD5 21a212fc82dbfe17c221424cec6dade2
BLAKE2b-256 73ee071f353d0783d98a054b5fbc704b4a1c8a542f3d728d52b8ca96be1271bf

See more details on using hashes here.

File details

Details for the file kl_div_attention-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for kl_div_attention-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 582d283a6d776ecc4cdc2d5cf6f66ffc11ff78526836c30d0351c3cbf1ca88ab
MD5 59029e38175a524ed6c6899157fb7e27
BLAKE2b-256 a670fa269049345fcb41336ad590d0333949d990730f5f4d3dda8ed15c9a7f23

See more details on using hashes here.

Supported by

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