Commit 47281bb
Adding ViT to torchvision/models (#4594)
* [vit] Adding ViT to torchvision/models
* adding pre-logits layer + resolving comments
* Fix the model attribute bug
* Change version to arch
* fix failing unittests
* remove useless prints
* reduce input size to fix unittests
* Increase windows-cpu executor to 2xlarge
* Use `batch_first=True` and remove classifier
* Change resource_class back to xlarge
* Remove vit_h_14
* Remove vit_h_14 from __all__
* Move vision_transformer.py into prototype
* Fix formatting issue
* remove arch in builder
* Fix type err in model builder
* address comments and trigger unittests
* remove the prototype import in torchvision.models
* Adding vit back to models to trigger CircleCI test
* fix test_jit_forward_backward
* Move all to prototype.
* Adopt new helper methods and fix prototype tests.
* Remove unused import.
Co-authored-by: Vasilis Vryniotis <[email protected]>
Co-authored-by: Vasilis Vryniotis <[email protected]>1 parent 29f38f1 commit 47281bb
File tree
9 files changed
+438
-6
lines changed- test
- expect
- torchvision/prototype/models
9 files changed
+438
-6
lines changedBinary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
93 | 103 | | |
94 | 104 | | |
95 | 105 | | |
| |||
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
147 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
148 | 167 | | |
149 | 168 | | |
150 | 169 | | |
| |||
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
179 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
180 | 208 | | |
181 | 209 | | |
182 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| 510 | + | |
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
| |||
515 | 516 | | |
516 | 517 | | |
517 | 518 | | |
518 | | - | |
| 519 | + | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments