Emiel commited on
Commit
62a3980
·
verified ·
1 Parent(s): 96e139d

Upload SwinForImageClassification

Browse files
Files changed (3) hide show
  1. README.md +5 -5
  2. config.json +41 -12
  3. model.safetensors +2 -2
README.md CHANGED
@@ -12,19 +12,19 @@ model-index:
12
  - name: cub-200-bird-classifier-swin
13
  results:
14
  - task:
15
- name: Image Classification
16
  type: image-classification
 
17
  dataset:
18
  name: cub-200-2011
19
  type: cub-200-2011
20
  args: default
21
  metrics:
22
- - name: validation_accuracy
23
- type: accuracy
24
  value: 0.8653
25
- - name: test_accuracy
26
- type: accuracy
27
  value: 0.8795
 
28
  ---
29
 
30
  # Model Card for Model ID
 
12
  - name: cub-200-bird-classifier-swin
13
  results:
14
  - task:
 
15
  type: image-classification
16
+ name: Image Classification
17
  dataset:
18
  name: cub-200-2011
19
  type: cub-200-2011
20
  args: default
21
  metrics:
22
+ - type: accuracy
 
23
  value: 0.8653
24
+ name: validation_accuracy
25
+ - type: accuracy
26
  value: 0.8795
27
+ name: test_accuracy
28
  ---
29
 
30
  # Model Card for Model ID
config.json CHANGED
@@ -1,13 +1,21 @@
1
  {
2
- "_name_or_path": "google/vit-base-patch16-224-in21k",
3
  "architectures": [
4
- "ViTForImageClassification"
5
  ],
6
  "attention_probs_dropout_prob": 0.0,
7
- "encoder_stride": 16,
 
 
 
 
 
 
 
 
8
  "hidden_act": "gelu",
9
  "hidden_dropout_prob": 0.0,
10
- "hidden_size": 768,
11
  "id2label": {
12
  "0": "LABEL_0",
13
  "1": "LABEL_1",
@@ -210,9 +218,8 @@
210
  "198": "LABEL_198",
211
  "199": "LABEL_199"
212
  },
213
- "image_size": 224,
214
  "initializer_range": 0.02,
215
- "intermediate_size": 3072,
216
  "label2id": {
217
  "LABEL_0": 0,
218
  "LABEL_1": 1,
@@ -415,13 +422,35 @@
415
  "LABEL_98": 98,
416
  "LABEL_99": 99
417
  },
418
- "layer_norm_eps": 1e-12,
419
- "model_type": "vit",
420
- "num_attention_heads": 12,
421
  "num_channels": 3,
422
- "num_hidden_layers": 12,
423
- "patch_size": 16,
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  "qkv_bias": true,
 
 
 
 
 
 
 
425
  "torch_dtype": "float32",
426
- "transformers_version": "4.47.0"
 
 
427
  }
 
1
  {
2
+ "_name_or_path": "microsoft/swin-large-patch4-window12-384-in22k",
3
  "architectures": [
4
+ "SwinForImageClassification"
5
  ],
6
  "attention_probs_dropout_prob": 0.0,
7
+ "depths": [
8
+ 2,
9
+ 2,
10
+ 18,
11
+ 2
12
+ ],
13
+ "drop_path_rate": 0.1,
14
+ "embed_dim": 192,
15
+ "encoder_stride": 32,
16
  "hidden_act": "gelu",
17
  "hidden_dropout_prob": 0.0,
18
+ "hidden_size": 1536,
19
  "id2label": {
20
  "0": "LABEL_0",
21
  "1": "LABEL_1",
 
218
  "198": "LABEL_198",
219
  "199": "LABEL_199"
220
  },
221
+ "image_size": 384,
222
  "initializer_range": 0.02,
 
223
  "label2id": {
224
  "LABEL_0": 0,
225
  "LABEL_1": 1,
 
422
  "LABEL_98": 98,
423
  "LABEL_99": 99
424
  },
425
+ "layer_norm_eps": 1e-05,
426
+ "mlp_ratio": 4.0,
427
+ "model_type": "swin",
428
  "num_channels": 3,
429
+ "num_heads": [
430
+ 6,
431
+ 12,
432
+ 24,
433
+ 48
434
+ ],
435
+ "num_layers": 4,
436
+ "out_features": [
437
+ "stage4"
438
+ ],
439
+ "out_indices": [
440
+ 4
441
+ ],
442
+ "patch_size": 4,
443
+ "path_norm": true,
444
  "qkv_bias": true,
445
+ "stage_names": [
446
+ "stem",
447
+ "stage1",
448
+ "stage2",
449
+ "stage3",
450
+ "stage4"
451
+ ],
452
  "torch_dtype": "float32",
453
+ "transformers_version": "4.47.0",
454
+ "use_absolute_embeddings": false,
455
+ "window_size": 12
456
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a8aaa29a64b49a90a1dba0dc4c821cbe8fd2a8bf9e4a3c1e352a51004b3b7d41
3
- size 343833032
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84f32ba9b2450a6d0b91fcf983bf1a2b32b4fb7066f2119bb675887d5d0b9448
3
+ size 786062056