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

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.5312
- Accuracy: 0.8245
- Precision: 0.8216
- Recall: 0.8245
- F1: 0.8048

## 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: StepLR(optimizer, step_size = 1600, gamma = 0.5, last_epoch=-1)
- num_epochs: 100
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|
| 0.6607        | 1.0   | 321  | 0.5487          | 0.8141   | 0.8096    | 0.8141 | 0.8033 |
| 0.4016        | 2.0   | 642  | 0.5312          | 0.8245   | 0.8216    | 0.8245 | 0.8048 |
| 0.2341        | 3.0   | 963  | 0.6710          | 0.8173   | 0.8126    | 0.8173 | 0.8001 |
| 0.1273        | 4.0   | 1284 | 0.6510          | 0.8419   | 0.8486    | 0.8419 | 0.8434 |
| 0.0855        | 5.0   | 1605 | 0.8303          | 0.8339   | 0.8345    | 0.8339 | 0.8251 |
| 0.0129        | 6.0   | 1926 | 0.7846          | 0.8516   | 0.8568    | 0.8516 | 0.8530 |
| 0.0008        | 7.0   | 2247 | 0.8298          | 0.8637   | 0.8623    | 0.8637 | 0.8604 |
| 0.0001        | 8.0   | 2568 | 0.8349          | 0.8644   | 0.8621    | 0.8644 | 0.8613 |
| 0.0001        | 9.0   | 2889 | 0.8528          | 0.8641   | 0.8617    | 0.8641 | 0.8610 |
| 0.0001        | 10.0  | 3210 | 0.8711          | 0.8634   | 0.8609    | 0.8634 | 0.8603 |
| 0.0001        | 11.0  | 3531 | 0.8797          | 0.8634   | 0.8609    | 0.8634 | 0.8603 |
| 0.0           | 12.0  | 3852 | 0.8891          | 0.8634   | 0.8609    | 0.8634 | 0.8603 |


### 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