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
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
Close
Hashes for tkitAttNLocal-0.0.0.316336997.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7043c34d70bd13a77a4327f7aec77c211f833a9fda6c9037c231016526c614cc |
|
MD5 | f27048d0e279fa98c07504f84ec4f26d |
|
BLAKE2b-256 | e1f3c95bcee36d5ffabceda90a2711e70c647f8d753254ff98afa0915cd3fd63 |
Close
Hashes for tkitAttNLocal-0.0.0.316336997-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ae96f2e2a2f764e1ac2c519eca2d8c12dee2c11142e054822b46d653ed9087 |
|
MD5 | ae68d704d65e84b90ef2c3e7e81d1af7 |
|
BLAKE2b-256 | 8a0e5bd976b50b30b4f67a839e08bfd8444925885696081acdc891f9cbd0e324 |