
<!-- 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-lr-reduce-plateau

This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the skin-cancer dataset.
It achieves the following results on the evaluation set:
- Loss: 0.5284
- Accuracy: 0.8117
- Precision: 0.8165
- Recall: 0.8117
- F1: 0.8039

## Training procedure

Early stopping is employed with a patience of 10 and validation loss as the stopping criteria.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: ReduceLROnPlateau(optimizer, mode='min', factor=0.1, patience=5, threshold=0.0001, threshold_mode='rel', cooldown=0, min_lr=0, eps=1e-08)
- num_epochs: 100
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 0.655         | 1.0   | 321  | 0.5284          | 0.8117   | 0.8165    | 0.8117 | 0.8039 |
| 0.3819        | 2.0   | 642  | 0.5429          | 0.7972   | 0.8233    | 0.7972 | 0.7989 |
| 0.2414        | 3.0   | 963  | 0.5962          | 0.8398   | 0.8370    | 0.8398 | 0.8229 |
| 0.1224        | 4.0   | 1284 | 0.6131          | 0.8485   | 0.8408    | 0.8485 | 0.8401 |
| 0.0589        | 5.0   | 1605 | 0.7092          | 0.8533   | 0.8501    | 0.8533 | 0.8490 |
| 0.049         | 6.0   | 1926 | 0.9049          | 0.8384   | 0.8443    | 0.8384 | 0.8388 |
| 0.0421        | 7.0   | 2247 | 0.9166          | 0.8492   | 0.8594    | 0.8492 | 0.8410 |
| 0.005         | 8.0   | 2568 | 0.8050          | 0.8644   | 0.8630    | 0.8644 | 0.8603 |
| 0.0002        | 9.0   | 2889 | 0.8123          | 0.8648   | 0.8627    | 0.8648 | 0.8608 |
| 0.0002        | 10.0  | 3210 | 0.8215          | 0.8641   | 0.8614    | 0.8641 | 0.8600 |
| 0.0001        | 11.0  | 3531 | 0.8326          | 0.8634   | 0.8605    | 0.8634 | 0.8591 |


### Framework versions

- Transformers 4.39.0.dev0
- Pytorch 2.2.1+cu121
- Datasets 2.18.0
- Tokenizers 0.15.2

akiec bcc bkl df mel nv vasc