Add Document Image Transformer (DiT) (#15984)

* Add conversion script

* Improve script

* Fix bug

* Add option to push to hub

* Add support for classification models

* Update model name

* Upload feature extractor files first

* Remove hash checking

* Fix config

* Add id2label

* Add import

* Fix id2label file name

* Fix expected shape

* Add model to README

* Improve docs

* Add integration test and fix CI

* Fix code style

* Add missing init

* Add model to SPECIAL_MODULE_TO_TEST_MAP

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
This commit is contained in:
NielsRogge
2022-03-10 11:34:44 +01:00
committed by GitHub
parent 6c9010ef63
commit 0835119bf3
15 changed files with 367 additions and 0 deletions

View File

@@ -276,6 +276,7 @@ SPECIAL_MODULE_TO_TEST_MAP = {
"auto/test_modeling_auto.py",
"auto/test_modeling_tf_pytorch.py",
"bort/test_modeling_bort.py",
"dit/test_modeling_dit.py",
],
"models/auto/modeling_flax_auto.py": "auto/test_modeling_flax_auto.py",
"models/auto/modeling_tf_auto.py": [