Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

KimRass/ViT

Open more actions menu

Repository files navigation

1. Pre-trained Models

DROP_PROB = 0.1
N_LAYERS = 6
HIDDEN_SIZE = 384
MLP_SIZE = 384
N_HEADS = 12
PATCH_SIZE = 4
BASE_LR = 1e-3
BETA1 = 0.9
BETA2 = 0.999
WEIGHT_DECAY = 5e-5
WARMUP_EPOCHS = 5
SMOOTHING = 0.1
CUTMIX = False
CUTOUT = False
HIDE_AND_SEEK = False
BATCH_SIZE = 2048
N_EPOCHS = 300

1) Trained on CIFAR-10 Dataset for 300 Epochs

2) Trained on CIFAR-100 Dataset for 256 Epochs

2. Implementation Details

  • F.gelu()nn.Dropout()의 순서가 되도록 Architecture를 변경했습니다. 순서를 반대로 할 경우 미분 값이 0이 되어 학습이 이루어지지 않는 현상이 발생함을 확인했습니다.
  • CIFAR-100에 대해서 N_LAYERS = 6, HIDDEN_SIZE = 384, N_HEADS = 6일 때, PATCH_SIZE = 16일 때보다 PATCH_SIZE = 8일 때, 그리고 PATCH_SIZE = 4일 때 성능이 향상됐습니다.
  • CIFAR-10과 CIFAR-100에 대해서 공통적으로 ViT-Base보다 작은 크기의 모델을 사용할 때 성능이 더 높았습니다.

3. Studies

1) Attention Map

  • Original image
  • head_fusion: "max", discard_ratio: 0.85

2) Position Embedding Similarity

About

PyTorch implementation of 'ViT' (Dosovitskiy et al., 2020) and training it on CIFAR-10 and CIFAR-100

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.