transformers tensorboard safetensors vit image-classification generated_from_trainer base_model:google/vit-base-patch16-224-in21k license:apache-2.0 autotrain_compatible endpoints_compatible region:us
---
license: apache-2.0
base_model: google/vit-base-patch16-224-in21k
tags:
- generated_from_trainer
metrics:
- accuracy
model-index:
- name: vit-snack-classification-fp16
  results: []
---

<!-- 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-snack-classification-fp16

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

## 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.0001
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 5
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.2332        | 0.33  | 100  | 0.2636          | 0.9309   |
| 0.1996        | 0.66  | 200  | 0.3591          | 0.9110   |
| 0.1995        | 0.99  | 300  | 0.3087          | 0.9194   |
| 0.1388        | 1.32  | 400  | 0.2386          | 0.9414   |
| 0.1304        | 1.65  | 500  | 0.2730          | 0.9309   |
| 0.1606        | 1.98  | 600  | 0.3044          | 0.9215   |
| 0.1067        | 2.31  | 700  | 0.2363          | 0.9435   |
| 0.0992        | 2.64  | 800  | 0.2666          | 0.9393   |
| 0.0976        | 2.97  | 900  | 0.2698          | 0.9382   |
| 0.1091        | 3.3   | 1000 | 0.2390          | 0.9487   |
| 0.1085        | 3.63  | 1100 | 0.2446          | 0.9487   |
| 0.1046        | 3.96  | 1200 | 0.2331          | 0.9414   |
| 0.119         | 4.29  | 1300 | 0.2156          | 0.9508   |
| 0.1233        | 4.62  | 1400 | 0.2179          | 0.9508   |
| 0.1186        | 4.95  | 1500 | 0.2106          | 0.9539   |


### Framework versions

- Transformers 4.37.2
- Pytorch 2.1.0+cu121
- Datasets 2.17.1
- Tokenizers 0.15.2
