Skip to main content

Terry toolkit tkitAttNLocal,

Project description

tkitAttNLocal

构建对角线mask矩阵,用来降维相对位置数据。

安装

pip install tkitAttNLocal

import torch.nn as nn
import torch
import torch.nn.functional as F
from tkitAttNLocal import AttNLocal

# 输入维度和长度一样的矩阵
a=torch.randn(32,100,100)

attL=AttNLocal(100,10)
attL(a).size()

torch.Size([32, 100, 10])

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

tkitAttNLocal-0.0.0.316336997.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

tkitAttNLocal-0.0.0.316336997-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file tkitAttNLocal-0.0.0.316336997.tar.gz.

File metadata

  • Download URL: tkitAttNLocal-0.0.0.316336997.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for tkitAttNLocal-0.0.0.316336997.tar.gz
Algorithm Hash digest
SHA256 7043c34d70bd13a77a4327f7aec77c211f833a9fda6c9037c231016526c614cc
MD5 f27048d0e279fa98c07504f84ec4f26d
BLAKE2b-256 e1f3c95bcee36d5ffabceda90a2711e70c647f8d753254ff98afa0915cd3fd63

See more details on using hashes here.

File details

Details for the file tkitAttNLocal-0.0.0.316336997-py3-none-any.whl.

File metadata

  • Download URL: tkitAttNLocal-0.0.0.316336997-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for tkitAttNLocal-0.0.0.316336997-py3-none-any.whl
Algorithm Hash digest
SHA256 52ae96f2e2a2f764e1ac2c519eca2d8c12dee2c11142e054822b46d653ed9087
MD5 ae68d704d65e84b90ef2c3e7e81d1af7
BLAKE2b-256 8a0e5bd976b50b30b4f67a839e08bfd8444925885696081acdc891f9cbd0e324

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