transformers tensorboard safetensors swin image-classification generated_from_trainer dataset:imagefolder base_model:microsoft/swin-tiny-patch4-window7-224 license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
base_model: microsoft/swin-tiny-patch4-window7-224
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: swin-tiny-patch4-window7-224-fine_tune
  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.8781512605042017
---

<!-- 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-tiny-patch4-window7-224-fine_tune

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.5958
- Accuracy: 0.8782

## 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: 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 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 5.175         | 0.96  | 16   | 4.7967          | 0.1345   |
| 4.1158        | 1.97  | 33   | 2.9977          | 0.3824   |
| 2.0676        | 2.99  | 50   | 1.5415          | 0.6807   |
| 1.4395        | 4.0   | 67   | 0.9951          | 0.8151   |
| 0.9396        | 4.96  | 83   | 0.8235          | 0.8277   |
| 0.7456        | 5.97  | 100  | 0.7195          | 0.8361   |
| 0.666         | 6.99  | 117  | 0.6406          | 0.8613   |
| 0.5893        | 8.0   | 134  | 0.6045          | 0.8739   |
| 0.4704        | 8.96  | 150  | 0.6016          | 0.8655   |
| 0.4475        | 9.97  | 167  | 0.5958          | 0.8782   |
| 0.3937        | 10.99 | 184  | 0.5856          | 0.8782   |
| 0.3327        | 12.0  | 201  | 0.5761          | 0.8782   |
| 0.3277        | 12.96 | 217  | 0.5758          | 0.8782   |
| 0.2928        | 13.97 | 234  | 0.5754          | 0.8739   |
| 0.2545        | 14.99 | 251  | 0.5711          | 0.8739   |
| 0.2657        | 16.0  | 268  | 0.5851          | 0.8739   |
| 0.2457        | 16.96 | 284  | 0.5805          | 0.8655   |
| 0.2359        | 17.97 | 301  | 0.5762          | 0.8697   |
| 0.2849        | 18.99 | 318  | 0.5792          | 0.8739   |
| 0.223         | 19.1  | 320  | 0.5792          | 0.8739   |


### Framework versions

- Transformers 4.37.2
- Pytorch 2.1.0+cu121
- Datasets 2.16.1
- Tokenizers 0.15.1
