alihassanijr commited on
Commit
3f3b40b
1 Parent(s): 35e3f65

Add weights and configs

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. config.json +33 -4
README.md CHANGED
@@ -49,8 +49,8 @@ import requests
49
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
50
  image = Image.open(requests.get(url, stream=True).raw)
51
 
52
- feature_extractor = AutoImageProcessor.from_pretrained("shi-labs/dinat-tiny-in1k-224")
53
- model = DinatForImageClassification.from_pretrained("shi-labs/dinat-tiny-in1k-224")
54
 
55
  inputs = feature_extractor(images=image, return_tensors="pt")
56
  outputs = model(**inputs)
 
49
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
50
  image = Image.open(requests.get(url, stream=True).raw)
51
 
52
+ feature_extractor = AutoImageProcessor.from_pretrained("shi-labs/dinat-mini-in1k-224")
53
+ model = DinatForImageClassification.from_pretrained("shi-labs/dinat-mini-in1k-224")
54
 
55
  inputs = feature_extractor(images=image, return_tensors="pt")
56
  outputs = model(**inputs)
config.json CHANGED
@@ -9,10 +9,39 @@
9
  6,
10
  5
11
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  "drop_path_rate": 0.2,
13
  "embed_dim": 64,
14
  "hidden_act": "gelu",
15
  "hidden_dropout_prob": 0.0,
 
16
  "id2label": {
17
  "0": "tench, Tinca tinca",
18
  "1": "goldfish, Carassius auratus",
@@ -1015,8 +1044,8 @@
1015
  "998": "ear, spike, capitulum",
1016
  "999": "toilet tissue, toilet paper, bathroom tissue"
1017
  },
1018
- "image_size": 224,
1019
  "initializer_range": 0.02,
 
1020
  "label2id": {
1021
  "Afghan hound, Afghan": 160,
1022
  "African chameleon, Chamaeleo chamaeleon": 47,
@@ -2019,6 +2048,7 @@
2019
  "zucchini, courgette": 939
2020
  },
2021
  "layer_norm_eps": 1e-05,
 
2022
  "mlp_ratio": 3.0,
2023
  "model_type": "dinat",
2024
  "num_channels": 3,
@@ -2028,11 +2058,10 @@
2028
  8,
2029
  16
2030
  ],
 
2031
  "patch_size": 4,
2032
  "path_norm": true,
2033
  "qkv_bias": true,
2034
  "torch_dtype": "float32",
2035
- "transformers_version": "4.25.0.dev0",
2036
- "kernel_size": 7,
2037
- "dilations": [[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]]
2038
  }
 
9
  6,
10
  5
11
  ],
12
+ "dilations": [
13
+ [
14
+ 1,
15
+ 8,
16
+ 1
17
+ ],
18
+ [
19
+ 1,
20
+ 4,
21
+ 1,
22
+ 4
23
+ ],
24
+ [
25
+ 1,
26
+ 2,
27
+ 1,
28
+ 2,
29
+ 1,
30
+ 2
31
+ ],
32
+ [
33
+ 1,
34
+ 1,
35
+ 1,
36
+ 1,
37
+ 1
38
+ ]
39
+ ],
40
  "drop_path_rate": 0.2,
41
  "embed_dim": 64,
42
  "hidden_act": "gelu",
43
  "hidden_dropout_prob": 0.0,
44
+ "hidden_size": 512,
45
  "id2label": {
46
  "0": "tench, Tinca tinca",
47
  "1": "goldfish, Carassius auratus",
 
1044
  "998": "ear, spike, capitulum",
1045
  "999": "toilet tissue, toilet paper, bathroom tissue"
1046
  },
 
1047
  "initializer_range": 0.02,
1048
+ "kernel_size": 7,
1049
  "label2id": {
1050
  "Afghan hound, Afghan": 160,
1051
  "African chameleon, Chamaeleo chamaeleon": 47,
 
2048
  "zucchini, courgette": 939
2049
  },
2050
  "layer_norm_eps": 1e-05,
2051
+ "layer_scale_init_value": 0.0,
2052
  "mlp_ratio": 3.0,
2053
  "model_type": "dinat",
2054
  "num_channels": 3,
 
2058
  8,
2059
  16
2060
  ],
2061
+ "num_layers": 4,
2062
  "patch_size": 4,
2063
  "path_norm": true,
2064
  "qkv_bias": true,
2065
  "torch_dtype": "float32",
2066
+ "transformers_version": "4.25.0.dev0"
 
 
2067
  }