Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
741b889
vit base
sineeli Nov 14, 2024
13dae08
Add vit backbone, classifier and preprocessor layers
sineeli Nov 15, 2024
b64b137
update args
sineeli Nov 15, 2024
429d635
add default args
sineeli Nov 15, 2024
6d69abc
correct build method
sineeli Nov 15, 2024
2e87884
fix build issues
sineeli Nov 15, 2024
bd3cce0
fix bugs
sineeli Nov 16, 2024
4232a06
Update backbone args and configs
sineeli Nov 18, 2024
32b08c5
correct position ids dtype
sineeli Nov 18, 2024
cc938c6
build token layer
sineeli Nov 18, 2024
78812de
token layer build
sineeli Nov 18, 2024
8a20465
assign correct dtype to TokenLayer
sineeli Nov 18, 2024
de754cc
fix build shape of token layer
sineeli Nov 18, 2024
84ba896
correct mlp dens var names
sineeli Nov 18, 2024
7a70e16
use default norm mean and std as per hugging face config
sineeli Nov 18, 2024
81e3021
correct position_ids
sineeli Nov 19, 2024
d3061d6
remove separate token layer
sineeli Nov 19, 2024
618e163
correct position ids
sineeli Nov 19, 2024
2338637
Checkpoint conversion script and minor changes
sineeli Nov 21, 2024
95e5868
correct flag type
sineeli Nov 21, 2024
9d2e5bd
correct key name
sineeli Nov 21, 2024
ac7d1d3
use flat list later we can extract in between layers if needed
sineeli Nov 21, 2024
8065c01
Add test cases and correct dtype polciy for model
sineeli Nov 21, 2024
a8be824
add proper docstrings
sineeli Nov 21, 2024
3f027a0
correct test cases
sineeli Nov 22, 2024
05acb70
use numpy for test data
sineeli Nov 25, 2024
521df6f
nit
sineeli Nov 25, 2024
ae2b800
nit
sineeli Nov 27, 2024
26c2224
Merge branch 'master' into sineeli/ViT
sineeli Dec 2, 2024
92149d5
add presets
sineeli Dec 2, 2024
5374c70
load vit preset from hugging face directly
sineeli Dec 5, 2024
ebee9ef
nit
sineeli Dec 5, 2024
93064bd
handle num classes case for ViT
sineeli Dec 5, 2024
e206e7b
replace toke with first
sineeli Dec 9, 2024
7a39d5b
convert all vit checkpoints using tools
sineeli Dec 10, 2024
0827954
Add custom ImageClassifier for ViT
sineeli Dec 10, 2024
ae9319a
remove token pooling and rename representation_size to intermediate_dim
sineeli Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
correct key name
  • Loading branch information
sineeli committed Nov 21, 2024
commit 9d2e5bdd73699eb7a957ddd6940e4abc040044d7
2 changes: 1 addition & 1 deletion tools/checkpoint_conversion/convert_vit_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def convert_model(hf_model):
image_shape=(image_size, image_size, 3),
patch_size=config["patch_size"],
num_layers=config["num_hidden_layers"],
num_heads=config["num_heads"],
num_heads=config["num_attention_heads"],
hidden_dim=config["hidden_size"],
mlp_dim=config["intermediate_size"],
dropout_rate=config["hidden_dropout_prob"],
Expand Down