Vision Transformer with Registers
Project description
A simple augmentation of PyTorch's VisionTransform class from torchvision.models to include registers, as per: https://arxiv.org/abs/2309.16588
Introduces registers to the encoder that are appended as tokens to the 'patchified' sequence, and excluded in the output.
The tokens are learnable parameters and do not receive positional embeddings.
The API of the class is identical with VisionTransformer, except the additional init argument for 'num_registers', which specifies the number of register tokens.
Installation
pip install rvit
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rvit-1.0.3.tar.gz.
File metadata
- Download URL: rvit-1.0.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cea8527dfaff35df676089db4befd7090ad3d5f8f5b9cb5f5c414eb59c28fb4
|
|
| MD5 |
97e8673b06f69ac6370363408b119e7c
|
|
| BLAKE2b-256 |
c878a3b65b56cedb793e3dc8faac565f9ac9dee757470e4851e0984572340db8
|
File details
Details for the file rvit-1.0.3-py3-none-any.whl.
File metadata
- Download URL: rvit-1.0.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e4d024ade3e8cea6ba59db9eee35cecf0106d45f927fb13a1faaaf19744fdde
|
|
| MD5 |
08617510d8085c73d173e5544b155f35
|
|
| BLAKE2b-256 |
2293f6e6647715e9ea194d172a541a3042a3a15aa74489816d9a6d36ff9ccc05
|