File size: 3,273 Bytes
7a57de2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
license: apache-2.0
tags:
- image-classification
- vision
- generated_from_trainer
datasets:
- food101
metrics:
- accuracy
model-index:
- name: swin-food101-jpqd
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: food101
      type: food101
      config: default
      split: validation
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.9055049504950495
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# swin-food101-jpqd

This model is a fine-tuned version of [microsoft/swin-base-patch4-window7-224](https://huggingface.co/microsoft/swin-base-patch4-window7-224) on the food101 dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3497
- Accuracy: 0.9055
  
This model is quantized. Structured sparsity in transformer linear layers: 40%.

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 128
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 10.0

### Training results

| Training Loss | Epoch | Step  | Validation Loss | Accuracy |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
| 2.2676        | 0.42  | 500   | 2.1087          | 0.7947   |
| 0.6823        | 0.84  | 1000  | 0.5127          | 0.8818   |
| 0.816         | 1.27  | 1500  | 0.3944          | 0.8954   |
| 0.5272        | 1.69  | 2000  | 0.3310          | 0.9050   |
| 12.263        | 2.11  | 2500  | 12.0040         | 0.9057   |
| 48.9519       | 2.54  | 3000  | 48.4500         | 0.8597   |
| 75.576        | 2.96  | 3500  | 75.5765         | 0.6951   |
| 93.7523       | 3.38  | 4000  | 93.3753         | 0.5992   |
| 103.7155      | 3.8   | 4500  | 103.5301        | 0.5622   |
| 107.7993      | 4.23  | 5000  | 108.0881        | 0.5636   |
| 109.6831      | 4.65  | 5500  | 109.2205        | 0.5844   |
| 1.8848        | 5.07  | 6000  | 0.9807          | 0.8315   |
| 1.0668        | 5.49  | 6500  | 0.6050          | 0.8740   |
| 0.7951        | 5.92  | 7000  | 0.5151          | 0.8838   |
| 0.7402        | 6.34  | 7500  | 0.4843          | 0.8906   |
| 0.7319        | 6.76  | 8000  | 0.4494          | 0.8933   |
| 0.5683        | 7.19  | 8500  | 0.4378          | 0.8953   |
| 0.496         | 7.61  | 9000  | 0.4115          | 0.8981   |
| 0.6174        | 8.03  | 9500  | 0.3952          | 0.9005   |
| 0.4921        | 8.45  | 10000 | 0.3765          | 0.9026   |
| 0.5843        | 8.88  | 10500 | 0.3678          | 0.9035   |
| 0.5485        | 9.3   | 11000 | 0.3576          | 0.9039   |
| 0.4337        | 9.72  | 11500 | 0.3512          | 0.9057   |


### Framework versions

- Transformers 4.26.0
- Pytorch 1.13.1+cu116
- Datasets 2.8.0
- Tokenizers 0.13.2