HaloNet - Pytorch
Implementation of the Attention layer from the paper, Scaling Local Self-Attention For Parameter Efficient Visual Backbones. This repository will only house the attention layer and not much more.
Install
$ pip install halonet-pytorch
Usage
import torch
from halonet_pytorch import HaloAttention
attn = HaloAttention(
dim = 512, # dimension of feature map
block_size = 8, # neighborhood block size (feature map must be divisible by this)
halo_size = 4, # halo size (block receptive field)
dim_head = 64, # dimension of each head
heads = 4 # number of attention heads
).cuda()
fmap = torch.randn(1, 512, 32, 32).cuda()
attn(fmap) # (1, 512, 32, 32)
Citations
@misc{vaswani2021scaling,
title = {Scaling Local Self-Attention For Parameter Efficient Visual Backbones},
author = {Ashish Vaswani and Prajit Ramachandran and Aravind Srinivas and Niki Parmar and Blake Hechtman and Jonathon Shlens},
year = {2021},
eprint = {2103.12731},
archivePrefix = {arXiv},
primaryClass = {cs.CV}
}
Metadata
Release files for halonet-pytorch 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| halonet_pytorch-0.0.5.tar.gz | 5.1 kB | Without provenance | Details for halonet_pytorch-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| halonet_pytorch-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for halonet_pytorch-0.0.5-py3-none-any.whl |
Total release size: 10.5 kB
Release files / halonet_pytorch-0.0.5.tar.gz
| Download URL | halonet_pytorch-0.0.5.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad850dad2ae6a815fc67752d9a06f88a3580b6a419aa5c8fcea3c17d315bbd6a
|
|
BLAKE2b-256 checksum How to use checksums |
9df8d1d786c68242675d4549b6339fb7c5e871cbfb0db85a060f6de9b557bb3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / halonet_pytorch-0.0.5-py3-none-any.whl
| Download URL | halonet_pytorch-0.0.5-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07cd56caa71dd7d6c1a3b9a62f7e52b9b47c657365958f58dfde15932811b30a
|
|
BLAKE2b-256 checksum How to use checksums |
eaa3cfedf9f678f32cad02a3b830f7c9831b571047b81a1b869ae241a0a29a95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for halonet-pytorch 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.