Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Mar 28, 2021
1 parent 15294c3 commit ab7315c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="./vit.gif" width="500px"></img>
<img src="./images/vit.gif" width="500px"></img>

## Vision Transformer - Pytorch

Expand Down Expand Up @@ -63,7 +63,7 @@ Embedding dropout rate.

## Distillation

<img src="./distill.png" width="300px"></img>
<img src="./images/distill.png" width="300px"></img>

A recent <a href="https://arxiv.org/abs/2012.12877">paper</a> has shown that use of a distillation token for distilling knowledge from convolutional nets to vision transformer can yield small and efficient vision transformers. This repository offers the means to do distillation easily.

Expand Down Expand Up @@ -145,7 +145,7 @@ preds = v(img) # (1, 1000)

## Token-to-Token ViT

<img src="./t2t.png" width="400px"></img>
<img src="./images/t2t.png" width="400px"></img>

<a href="https://arxiv.org/abs/2101.11986">This paper</a> proposes that the first couple layers should downsample the image sequence by unfolding, leading to overlapping image data in each token as shown in the figure above. You can use this variant of the `ViT` as follows.

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit ab7315c

Please sign in to comment.