Instructions to use saeruig/brain_tumor_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saeruig/brain_tumor_classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="saeruig/brain_tumor_classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("saeruig/brain_tumor_classifier") model = AutoModelForImageClassification.from_pretrained("saeruig/brain_tumor_classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download trainer_state.json from saeruig/brain_tumor_classifier: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/saeruig/brain_tumor_classifier/resolve/main/trainer_state.json
- Command line
-
hf download hf://saeruig/brain_tumor_classifier/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/saeruig/brain_tumor_classifier/resolve/main/trainer_state.json
1.06 kB
| { | |
| "best_metric": 0.2683512270450592, | |
| "best_model_checkpoint": "./vit-base-beans/checkpoint-40", | |
| "epoch": 4.0, | |
| "global_step": 40, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 1.0, | |
| "learning_rate": 0.00015000000000000001, | |
| "loss": 0.5349, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "learning_rate": 0.0001, | |
| "loss": 0.1241, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "learning_rate": 5e-05, | |
| "loss": 0.0495, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "learning_rate": 0.0, | |
| "loss": 0.0202, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "eval_accuracy": 0.8888888888888888, | |
| "eval_loss": 0.2683512270450592, | |
| "eval_runtime": 0.5403, | |
| "eval_samples_per_second": 66.626, | |
| "eval_steps_per_second": 9.254, | |
| "step": 40 | |
| } | |
| ], | |
| "max_steps": 40, | |
| "num_train_epochs": 4, | |
| "total_flos": 4.959487335333888e+16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |