File size: 3,395 Bytes
f193def
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a49e07d
 
 
 
 
 
 
 
 
 
 
c42b2eb
 
 
80a7af2
 
 
f193def
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
105
106
107
108
109
110
111
112
113
114
---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: swin-base-patch4-window7-224-20epochs-finetuned-memes
  results:
  - task:
      name: Image Classification
      type: image-classification
    dataset:
      name: imagefolder
      type: imagefolder
      config: default
      split: train
      args: default
    metrics:
    - name: Accuracy
      type: accuracy
      value: 0.847758887171561
  - task:
      type: image-classification
      name: Image Classification
    dataset:
      type: custom
      name: custom
      split: test
    metrics:
    - type: f1
      value: 0.8504084378729573
      name: F1
    - type: precision
      value: 0.8519647060733512
      name: Precision
    - type: recall
      value: 0.8523956723338485
      name: Recall
---

<!-- 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-base-patch4-window7-224-20epochs-finetuned-memes

This model is a fine-tuned version of [microsoft/swin-tiny-patch4-window7-224](https://huggingface.co/microsoft/swin-tiny-patch4-window7-224) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.7090
- Accuracy: 0.8478

## 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: 0.00012
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 20

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 1.0238        | 0.99  | 40   | 0.9636          | 0.6445   |
| 0.777         | 1.99  | 80   | 0.6591          | 0.7666   |
| 0.4763        | 2.99  | 120  | 0.5381          | 0.8130   |
| 0.3215        | 3.99  | 160  | 0.5244          | 0.8253   |
| 0.2179        | 4.99  | 200  | 0.5123          | 0.8238   |
| 0.1868        | 5.99  | 240  | 0.5052          | 0.8308   |
| 0.154         | 6.99  | 280  | 0.5444          | 0.8338   |
| 0.1166        | 7.99  | 320  | 0.6318          | 0.8238   |
| 0.1099        | 8.99  | 360  | 0.5656          | 0.8338   |
| 0.0925        | 9.99  | 400  | 0.6057          | 0.8338   |
| 0.0779        | 10.99 | 440  | 0.5942          | 0.8393   |
| 0.0629        | 11.99 | 480  | 0.6112          | 0.8400   |
| 0.0742        | 12.99 | 520  | 0.6588          | 0.8331   |
| 0.0752        | 13.99 | 560  | 0.6143          | 0.8408   |
| 0.0577        | 14.99 | 600  | 0.6450          | 0.8516   |
| 0.0589        | 15.99 | 640  | 0.6787          | 0.8400   |
| 0.0555        | 16.99 | 680  | 0.6641          | 0.8454   |
| 0.052         | 17.99 | 720  | 0.7213          | 0.8524   |
| 0.0589        | 18.99 | 760  | 0.6917          | 0.8470   |
| 0.0506        | 19.99 | 800  | 0.7090          | 0.8478   |


### Framework versions

- Transformers 4.22.1
- Pytorch 1.12.1+cu113
- Datasets 2.4.0
- Tokenizers 0.12.1