
<!-- 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. -->

# vit-base-patch16-224-finetuned-main-gpu-20e-final

This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0297
- Accuracy: 0.9912

## 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 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
| 0.4852        | 1.0   | 551   | 0.4533          | 0.8042   |
| 0.3033        | 2.0   | 1102  | 0.2157          | 0.9157   |
| 0.2339        | 3.0   | 1653  | 0.1212          | 0.9534   |
| 0.1694        | 4.0   | 2204  | 0.1076          | 0.9603   |
| 0.1715        | 5.0   | 2755  | 0.0830          | 0.9692   |
| 0.1339        | 6.0   | 3306  | 0.0674          | 0.9762   |
| 0.1527        | 7.0   | 3857  | 0.0556          | 0.9791   |
| 0.1214        | 8.0   | 4408  | 0.0455          | 0.9832   |
| 0.1062        | 9.0   | 4959  | 0.0466          | 0.9829   |
| 0.0974        | 10.0  | 5510  | 0.0403          | 0.9849   |
| 0.0875        | 11.0  | 6061  | 0.0385          | 0.9860   |
| 0.0992        | 12.0  | 6612  | 0.0376          | 0.9870   |
| 0.065         | 13.0  | 7163  | 0.0392          | 0.9864   |
| 0.0775        | 14.0  | 7714  | 0.0344          | 0.9890   |
| 0.0544        | 15.0  | 8265  | 0.0362          | 0.9888   |
| 0.0584        | 16.0  | 8816  | 0.0422          | 0.9872   |
| 0.0722        | 17.0  | 9367  | 0.0314          | 0.9900   |
| 0.0765        | 18.0  | 9918  | 0.0313          | 0.9908   |
| 0.0696        | 19.0  | 10469 | 0.0297          | 0.9912   |
| 0.0596        | 20.0  | 11020 | 0.0285          | 0.9910   |


### Framework versions

- Transformers 4.26.1
- Pytorch 1.13.1+cu116
- Datasets 2.10.1
- Tokenizers 0.13.2

fnh hcc hem healthy