Skip to main content

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])

Metadata

Release files for tkitAttNLocal 0.0.0.316336997

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkitAttNLocal 0.0.0.316336997
File Size Uploaded
tkitAttNLocal-0.0.0.316336997.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tkitAttNLocal 0.0.0.316336997
File Interpreter ABI Platform
tkitAttNLocal-0.0.0.316336997-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / tkitAttNLocal-0.0.0.316336997.tar.gz

Download URL tkitAttNLocal-0.0.0.316336997.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7043c34d70bd13a77a4327f7aec77c211f833a9fda6c9037c231016526c614cc
BLAKE2b-256 checksum
How to use checksums
e1f3c95bcee36d5ffabceda90a2711e70c647f8d753254ff98afa0915cd3fd63
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / tkitAttNLocal-0.0.0.316336997-py3-none-any.whl

Download URL tkitAttNLocal-0.0.0.316336997-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52ae96f2e2a2f764e1ac2c519eca2d8c12dee2c11142e054822b46d653ed9087
BLAKE2b-256 checksum
How to use checksums
8a0e5bd976b50b30b4f67a839e08bfd8444925885696081acdc891f9cbd0e324
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.0.316336997 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page