first commit

This commit is contained in:
YYJ-aaaa 2024-12-27 17:27:54 +08:00
parent c46b303945
commit 25efc02ce3
9 changed files with 369 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
checkpoint-*/

13
all_results.json Normal file
View File

@ -0,0 +1,13 @@
{
"epoch": 1.0,
"eval_accuracy": 0.9788,
"eval_loss": 0.25641629099845886,
"eval_runtime": 263.6472,
"eval_samples_per_second": 37.929,
"eval_steps_per_second": 1.187,
"total_flos": 3.86867749153407e+18,
"train_loss": 0.7974265074118589,
"train_runtime": 3555.934,
"train_samples_per_second": 14.061,
"train_steps_per_second": 0.11
}

48
config.json Normal file
View File

@ -0,0 +1,48 @@
{
"_name_or_path": "google/vit-base-patch16-224-in21k",
"architectures": [
"ViTForImageClassification"
],
"attention_probs_dropout_prob": 0.0,
"encoder_stride": 16,
"hidden_act": "gelu",
"hidden_dropout_prob": 0.0,
"hidden_size": 768,
"id2label": {
"0": "airplane",
"1": "automobile",
"2": "bird",
"3": "cat",
"4": "deer",
"5": "dog",
"6": "frog",
"7": "horse",
"8": "ship",
"9": "truck"
},
"image_size": 224,
"initializer_range": 0.02,
"intermediate_size": 3072,
"label2id": {
"airplane": "0",
"automobile": "1",
"bird": "2",
"cat": "3",
"deer": "4",
"dog": "5",
"frog": "6",
"horse": "7",
"ship": "8",
"truck": "9"
},
"layer_norm_eps": 1e-12,
"model_type": "vit",
"num_attention_heads": 12,
"num_channels": 3,
"num_hidden_layers": 12,
"patch_size": 16,
"problem_type": "single_label_classification",
"qkv_bias": true,
"torch_dtype": "float32",
"transformers_version": "4.17.0"
}

8
eval_results.json Normal file
View File

@ -0,0 +1,8 @@
{
"epoch": 1.0,
"eval_accuracy": 0.9788,
"eval_loss": 0.25641629099845886,
"eval_runtime": 263.6472,
"eval_samples_per_second": 37.929,
"eval_steps_per_second": 1.187
}

17
preprocessor_config.json Normal file
View File

@ -0,0 +1,17 @@
{
"do_normalize": true,
"do_resize": true,
"feature_extractor_type": "ViTFeatureExtractor",
"image_mean": [
0.5,
0.5,
0.5
],
"image_std": [
0.5,
0.5,
0.5
],
"resample": 2,
"size": 224
}

BIN
pytorch_model.bin (Stored with Git LFS) Normal file

Binary file not shown.

8
train_results.json Normal file
View File

@ -0,0 +1,8 @@
{
"epoch": 1.0,
"total_flos": 3.86867749153407e+18,
"train_loss": 0.7974265074118589,
"train_runtime": 3555.934,
"train_samples_per_second": 14.061,
"train_steps_per_second": 0.11
}

268
trainer_state.json Normal file
View File

@ -0,0 +1,268 @@
{
"best_metric": 0.9788,
"best_model_checkpoint": "vit-base-patch16-224-in21k-finetuned-cifar10/checkpoint-390",
"epoch": 0.9980806142034548,
"global_step": 390,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"epoch": 0.03,
"learning_rate": 1.282051282051282e-05,
"loss": 2.3249,
"step": 10
},
{
"epoch": 0.05,
"learning_rate": 2.564102564102564e-05,
"loss": 2.2694,
"step": 20
},
{
"epoch": 0.08,
"learning_rate": 3.846153846153846e-05,
"loss": 2.1649,
"step": 30
},
{
"epoch": 0.1,
"learning_rate": 4.985754985754986e-05,
"loss": 1.9757,
"step": 40
},
{
"epoch": 0.13,
"learning_rate": 4.8433048433048433e-05,
"loss": 1.6938,
"step": 50
},
{
"epoch": 0.15,
"learning_rate": 4.700854700854701e-05,
"loss": 1.4069,
"step": 60
},
{
"epoch": 0.18,
"learning_rate": 4.558404558404559e-05,
"loss": 1.1938,
"step": 70
},
{
"epoch": 0.2,
"learning_rate": 4.415954415954416e-05,
"loss": 1.045,
"step": 80
},
{
"epoch": 0.23,
"learning_rate": 4.2735042735042735e-05,
"loss": 0.9435,
"step": 90
},
{
"epoch": 0.26,
"learning_rate": 4.131054131054131e-05,
"loss": 0.8542,
"step": 100
},
{
"epoch": 0.28,
"learning_rate": 3.988603988603989e-05,
"loss": 0.7705,
"step": 110
},
{
"epoch": 0.31,
"learning_rate": 3.846153846153846e-05,
"loss": 0.7295,
"step": 120
},
{
"epoch": 0.33,
"learning_rate": 3.7037037037037037e-05,
"loss": 0.6826,
"step": 130
},
{
"epoch": 0.36,
"learning_rate": 3.561253561253561e-05,
"loss": 0.6886,
"step": 140
},
{
"epoch": 0.38,
"learning_rate": 3.418803418803419e-05,
"loss": 0.604,
"step": 150
},
{
"epoch": 0.41,
"learning_rate": 3.2763532763532764e-05,
"loss": 0.5829,
"step": 160
},
{
"epoch": 0.44,
"learning_rate": 3.133903133903134e-05,
"loss": 0.5991,
"step": 170
},
{
"epoch": 0.46,
"learning_rate": 2.9914529914529915e-05,
"loss": 0.5614,
"step": 180
},
{
"epoch": 0.49,
"learning_rate": 2.8490028490028492e-05,
"loss": 0.5863,
"step": 190
},
{
"epoch": 0.51,
"learning_rate": 2.706552706552707e-05,
"loss": 0.5146,
"step": 200
},
{
"epoch": 0.54,
"learning_rate": 2.564102564102564e-05,
"loss": 0.5278,
"step": 210
},
{
"epoch": 0.56,
"learning_rate": 2.4216524216524217e-05,
"loss": 0.4996,
"step": 220
},
{
"epoch": 0.59,
"learning_rate": 2.2792022792022794e-05,
"loss": 0.5387,
"step": 230
},
{
"epoch": 0.61,
"learning_rate": 2.1367521367521368e-05,
"loss": 0.4954,
"step": 240
},
{
"epoch": 0.64,
"learning_rate": 1.9943019943019945e-05,
"loss": 0.5052,
"step": 250
},
{
"epoch": 0.67,
"learning_rate": 1.8518518518518518e-05,
"loss": 0.4617,
"step": 260
},
{
"epoch": 0.69,
"learning_rate": 1.7094017094017095e-05,
"loss": 0.4812,
"step": 270
},
{
"epoch": 0.72,
"learning_rate": 1.566951566951567e-05,
"loss": 0.4475,
"step": 280
},
{
"epoch": 0.74,
"learning_rate": 1.4245014245014246e-05,
"loss": 0.4786,
"step": 290
},
{
"epoch": 0.77,
"learning_rate": 1.282051282051282e-05,
"loss": 0.4722,
"step": 300
},
{
"epoch": 0.79,
"learning_rate": 1.1396011396011397e-05,
"loss": 0.4365,
"step": 310
},
{
"epoch": 0.82,
"learning_rate": 9.971509971509972e-06,
"loss": 0.4803,
"step": 320
},
{
"epoch": 0.84,
"learning_rate": 8.547008547008548e-06,
"loss": 0.4504,
"step": 330
},
{
"epoch": 0.87,
"learning_rate": 7.122507122507123e-06,
"loss": 0.4467,
"step": 340
},
{
"epoch": 0.9,
"learning_rate": 5.6980056980056985e-06,
"loss": 0.4477,
"step": 350
},
{
"epoch": 0.92,
"learning_rate": 4.273504273504274e-06,
"loss": 0.4257,
"step": 360
},
{
"epoch": 0.95,
"learning_rate": 2.8490028490028492e-06,
"loss": 0.4344,
"step": 370
},
{
"epoch": 0.97,
"learning_rate": 1.4245014245014246e-06,
"loss": 0.4493,
"step": 380
},
{
"epoch": 1.0,
"learning_rate": 0.0,
"loss": 0.4291,
"step": 390
},
{
"epoch": 1.0,
"eval_accuracy": 0.9788,
"eval_loss": 0.25641629099845886,
"eval_runtime": 262.0666,
"eval_samples_per_second": 38.158,
"eval_steps_per_second": 1.194,
"step": 390
},
{
"epoch": 1.0,
"step": 390,
"total_flos": 3.86867749153407e+18,
"train_loss": 0.7974265074118589,
"train_runtime": 3555.934,
"train_samples_per_second": 14.061,
"train_steps_per_second": 0.11
}
],
"max_steps": 390,
"num_train_epochs": 1,
"total_flos": 3.86867749153407e+18,
"trial_name": null,
"trial_params": null
}

BIN
training_args.bin (Stored with Git LFS) Normal file

Binary file not shown.