Upload folder using huggingface_hub
Browse files- README.md +21 -0
- config.json +26 -0
- image_converter.json +36 -0
- metadata.json +9 -0
- model.weights.h5 +3 -0
- preprocessor.json +54 -0
- task.json +92 -0
- task.weights.h5 +3 -0
README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: keras-hub
|
| 3 |
+
---
|
| 4 |
+
This is a [`DeiT` model](https://keras.io/api/keras_hub/models/dei_t) uploaded using the KerasHub library and can be used with JAX, TensorFlow, and PyTorch backends.
|
| 5 |
+
This model is related to a `ImageClassifier` task.
|
| 6 |
+
|
| 7 |
+
Model config:
|
| 8 |
+
* **name:** dei_t_backbone
|
| 9 |
+
* **trainable:** True
|
| 10 |
+
* **image_shape:** [224, 224, 3]
|
| 11 |
+
* **patch_size:** [16, 16]
|
| 12 |
+
* **num_layers:** 12
|
| 13 |
+
* **num_heads:** 3
|
| 14 |
+
* **hidden_dim:** 192
|
| 15 |
+
* **intermediate_dim:** 768
|
| 16 |
+
* **dropout_rate:** 0.0
|
| 17 |
+
* **attention_dropout:** 0.0
|
| 18 |
+
* **layer_norm_epsilon:** 1e-12
|
| 19 |
+
* **use_mha_bias:** True
|
| 20 |
+
|
| 21 |
+
This model card has been generated automatically and should be completed by the model author. See [Model Cards documentation](https://huggingface.co/docs/hub/model-cards) for more information.
|
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.deit.deit_backbone",
|
| 3 |
+
"class_name": "DeiTBackbone",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "dei_t_backbone",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"image_shape": [
|
| 8 |
+
224,
|
| 9 |
+
224,
|
| 10 |
+
3
|
| 11 |
+
],
|
| 12 |
+
"patch_size": [
|
| 13 |
+
16,
|
| 14 |
+
16
|
| 15 |
+
],
|
| 16 |
+
"num_layers": 12,
|
| 17 |
+
"num_heads": 3,
|
| 18 |
+
"hidden_dim": 192,
|
| 19 |
+
"intermediate_dim": 768,
|
| 20 |
+
"dropout_rate": 0.0,
|
| 21 |
+
"attention_dropout": 0.0,
|
| 22 |
+
"layer_norm_epsilon": 1e-12,
|
| 23 |
+
"use_mha_bias": true
|
| 24 |
+
},
|
| 25 |
+
"registered_name": "keras_hub>DeiTBackbone"
|
| 26 |
+
}
|
image_converter.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.deit.deit_image_converter",
|
| 3 |
+
"class_name": "DeiTImageConverter",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "dei_t_image_converter",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "float32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"image_size": [
|
| 16 |
+
224,
|
| 17 |
+
224
|
| 18 |
+
],
|
| 19 |
+
"scale": [
|
| 20 |
+
0.017124753831663668,
|
| 21 |
+
0.01750700280112045,
|
| 22 |
+
0.017429193899782133
|
| 23 |
+
],
|
| 24 |
+
"offset": [
|
| 25 |
+
-2.1179039301310043,
|
| 26 |
+
-2.0357142857142856,
|
| 27 |
+
-1.8044444444444445
|
| 28 |
+
],
|
| 29 |
+
"interpolation": "bicubic",
|
| 30 |
+
"antialias": true,
|
| 31 |
+
"crop_to_aspect_ratio": false,
|
| 32 |
+
"pad_to_aspect_ratio": false,
|
| 33 |
+
"bounding_box_format": "yxyx"
|
| 34 |
+
},
|
| 35 |
+
"registered_name": "keras_hub>DeiTImageConverter"
|
| 36 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"keras_version": "3.8.0",
|
| 3 |
+
"keras_hub_version": "0.22.0.dev0",
|
| 4 |
+
"parameter_count": 5524800,
|
| 5 |
+
"date_saved": "2025-07-28@20:38:24",
|
| 6 |
+
"tasks": [
|
| 7 |
+
"ImageClassifier"
|
| 8 |
+
]
|
| 9 |
+
}
|
model.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66d8c17a87f3cff1727fdf0bb3f78b648f5ad856af2c4085b016788b70e9babb
|
| 3 |
+
size 22571064
|
preprocessor.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.deit.deit_image_classifier_preprocessor",
|
| 3 |
+
"class_name": "DeiTImageClassifierPreprocessor",
|
| 4 |
+
"config": {
|
| 5 |
+
"name": "dei_t_image_classifier_preprocessor",
|
| 6 |
+
"trainable": true,
|
| 7 |
+
"dtype": {
|
| 8 |
+
"module": "keras",
|
| 9 |
+
"class_name": "DTypePolicy",
|
| 10 |
+
"config": {
|
| 11 |
+
"name": "float32"
|
| 12 |
+
},
|
| 13 |
+
"registered_name": null
|
| 14 |
+
},
|
| 15 |
+
"image_converter": {
|
| 16 |
+
"module": "keras_hub.src.models.deit.deit_image_converter",
|
| 17 |
+
"class_name": "DeiTImageConverter",
|
| 18 |
+
"config": {
|
| 19 |
+
"name": "dei_t_image_converter",
|
| 20 |
+
"trainable": true,
|
| 21 |
+
"dtype": {
|
| 22 |
+
"module": "keras",
|
| 23 |
+
"class_name": "DTypePolicy",
|
| 24 |
+
"config": {
|
| 25 |
+
"name": "float32"
|
| 26 |
+
},
|
| 27 |
+
"registered_name": null
|
| 28 |
+
},
|
| 29 |
+
"image_size": [
|
| 30 |
+
224,
|
| 31 |
+
224
|
| 32 |
+
],
|
| 33 |
+
"scale": [
|
| 34 |
+
0.017124753831663668,
|
| 35 |
+
0.01750700280112045,
|
| 36 |
+
0.017429193899782133
|
| 37 |
+
],
|
| 38 |
+
"offset": [
|
| 39 |
+
-2.1179039301310043,
|
| 40 |
+
-2.0357142857142856,
|
| 41 |
+
-1.8044444444444445
|
| 42 |
+
],
|
| 43 |
+
"interpolation": "bicubic",
|
| 44 |
+
"antialias": true,
|
| 45 |
+
"crop_to_aspect_ratio": false,
|
| 46 |
+
"pad_to_aspect_ratio": false,
|
| 47 |
+
"bounding_box_format": "yxyx"
|
| 48 |
+
},
|
| 49 |
+
"registered_name": "keras_hub>DeiTImageConverter"
|
| 50 |
+
},
|
| 51 |
+
"config_file": "preprocessor.json"
|
| 52 |
+
},
|
| 53 |
+
"registered_name": "keras_hub>DeiTImageClassifierPreprocessor"
|
| 54 |
+
}
|
task.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"module": "keras_hub.src.models.deit.deit_image_classifier",
|
| 3 |
+
"class_name": "DeiTImageClassifier",
|
| 4 |
+
"config": {
|
| 5 |
+
"backbone": {
|
| 6 |
+
"module": "keras_hub.src.models.deit.deit_backbone",
|
| 7 |
+
"class_name": "DeiTBackbone",
|
| 8 |
+
"config": {
|
| 9 |
+
"name": "dei_t_backbone",
|
| 10 |
+
"trainable": true,
|
| 11 |
+
"image_shape": [
|
| 12 |
+
224,
|
| 13 |
+
224,
|
| 14 |
+
3
|
| 15 |
+
],
|
| 16 |
+
"patch_size": [
|
| 17 |
+
16,
|
| 18 |
+
16
|
| 19 |
+
],
|
| 20 |
+
"num_layers": 12,
|
| 21 |
+
"num_heads": 3,
|
| 22 |
+
"hidden_dim": 192,
|
| 23 |
+
"intermediate_dim": 768,
|
| 24 |
+
"dropout_rate": 0.0,
|
| 25 |
+
"attention_dropout": 0.0,
|
| 26 |
+
"layer_norm_epsilon": 1e-12,
|
| 27 |
+
"use_mha_bias": true
|
| 28 |
+
},
|
| 29 |
+
"registered_name": "keras_hub>DeiTBackbone"
|
| 30 |
+
},
|
| 31 |
+
"preprocessor": {
|
| 32 |
+
"module": "keras_hub.src.models.deit.deit_image_classifier_preprocessor",
|
| 33 |
+
"class_name": "DeiTImageClassifierPreprocessor",
|
| 34 |
+
"config": {
|
| 35 |
+
"name": "dei_t_image_classifier_preprocessor",
|
| 36 |
+
"trainable": true,
|
| 37 |
+
"dtype": {
|
| 38 |
+
"module": "keras",
|
| 39 |
+
"class_name": "DTypePolicy",
|
| 40 |
+
"config": {
|
| 41 |
+
"name": "float32"
|
| 42 |
+
},
|
| 43 |
+
"registered_name": null
|
| 44 |
+
},
|
| 45 |
+
"image_converter": {
|
| 46 |
+
"module": "keras_hub.src.models.deit.deit_image_converter",
|
| 47 |
+
"class_name": "DeiTImageConverter",
|
| 48 |
+
"config": {
|
| 49 |
+
"name": "dei_t_image_converter",
|
| 50 |
+
"trainable": true,
|
| 51 |
+
"dtype": {
|
| 52 |
+
"module": "keras",
|
| 53 |
+
"class_name": "DTypePolicy",
|
| 54 |
+
"config": {
|
| 55 |
+
"name": "float32"
|
| 56 |
+
},
|
| 57 |
+
"registered_name": null
|
| 58 |
+
},
|
| 59 |
+
"image_size": [
|
| 60 |
+
224,
|
| 61 |
+
224
|
| 62 |
+
],
|
| 63 |
+
"scale": [
|
| 64 |
+
0.017124753831663668,
|
| 65 |
+
0.01750700280112045,
|
| 66 |
+
0.017429193899782133
|
| 67 |
+
],
|
| 68 |
+
"offset": [
|
| 69 |
+
-2.1179039301310043,
|
| 70 |
+
-2.0357142857142856,
|
| 71 |
+
-1.8044444444444445
|
| 72 |
+
],
|
| 73 |
+
"interpolation": "bicubic",
|
| 74 |
+
"antialias": true,
|
| 75 |
+
"crop_to_aspect_ratio": false,
|
| 76 |
+
"pad_to_aspect_ratio": false,
|
| 77 |
+
"bounding_box_format": "yxyx"
|
| 78 |
+
},
|
| 79 |
+
"registered_name": "keras_hub>DeiTImageConverter"
|
| 80 |
+
},
|
| 81 |
+
"config_file": "preprocessor.json"
|
| 82 |
+
},
|
| 83 |
+
"registered_name": "keras_hub>DeiTImageClassifierPreprocessor"
|
| 84 |
+
},
|
| 85 |
+
"name": "dei_t_image_classifier",
|
| 86 |
+
"num_classes": 1000,
|
| 87 |
+
"pooling": "token",
|
| 88 |
+
"activation": null,
|
| 89 |
+
"dropout": 0.0
|
| 90 |
+
},
|
| 91 |
+
"registered_name": "keras_hub>DeiTImageClassifier"
|
| 92 |
+
}
|
task.weights.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47dfb8c02bb7fc45e188ca1df64af236290115fb080ab3d9130a13fb2a9b6013
|
| 3 |
+
size 23358112
|