essam24 commited on
Commit
37060ef
1 Parent(s): 142d8cc

initial commit

Browse files
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: microsoft/resnet-50
4
+ tags:
5
+ - image-classification
6
+ - generated_from_trainer
7
+ datasets:
8
+ - imagefolder
9
+ model-index:
10
+ - name: tumour
11
+ results: []
12
+ ---
13
+
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
+
17
+ # tumour
18
+
19
+ This model is a fine-tuned version of [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) on the essam24/brain-tumour-v1 dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 0.8286
22
+
23
+ ## Model description
24
+
25
+ More information needed
26
+
27
+ ## Intended uses & limitations
28
+
29
+ More information needed
30
+
31
+ ## Training and evaluation data
32
+
33
+ More information needed
34
+
35
+ ## Training procedure
36
+
37
+ ### Training hyperparameters
38
+
39
+ The following hyperparameters were used during training:
40
+ - learning_rate: 2e-05
41
+ - train_batch_size: 16
42
+ - eval_batch_size: 16
43
+ - seed: 42
44
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
+ - lr_scheduler_type: linear
46
+ - num_epochs: 5
47
+
48
+ ### Training results
49
+
50
+ | Training Loss | Epoch | Step | Validation Loss |
51
+ |:-------------:|:-----:|:----:|:---------------:|
52
+ | No log | 1.0 | 195 | 4.5083 |
53
+ | No log | 2.0 | 390 | 1.4575 |
54
+ | 3.0791 | 3.0 | 585 | 0.9050 |
55
+ | 3.0791 | 4.0 | 780 | 0.8538 |
56
+ | 3.0791 | 5.0 | 975 | 0.8286 |
57
+
58
+
59
+ ### Framework versions
60
+
61
+ - Transformers 4.42.4
62
+ - Pytorch 2.4.0+cu121
63
+ - Datasets 2.21.0
64
+ - Tokenizers 0.19.1
all_results.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 5.0,
3
+ "eval_loss": 0.8285718560218811,
4
+ "eval_runtime": 79.5915,
5
+ "eval_samples_per_second": 10.177,
6
+ "eval_steps_per_second": 0.641,
7
+ "total_flos": 3.588142521058099e+17,
8
+ "train_loss": 1.746917755909455,
9
+ "train_runtime": 2049.8226,
10
+ "train_samples_per_second": 7.584,
11
+ "train_steps_per_second": 0.476
12
+ }
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/resnet-50",
3
+ "architectures": [
4
+ "ResNetForImageClassification"
5
+ ],
6
+ "depths": [
7
+ 3,
8
+ 4,
9
+ 6,
10
+ 3
11
+ ],
12
+ "downsample_in_bottleneck": false,
13
+ "downsample_in_first_stage": false,
14
+ "embedding_size": 64,
15
+ "hidden_act": "relu",
16
+ "hidden_sizes": [
17
+ 256,
18
+ 512,
19
+ 1024,
20
+ 2048
21
+ ],
22
+ "id2label": {
23
+ "0": "LABEL_0",
24
+ "1": "LABEL_1",
25
+ "2": "LABEL_2"
26
+ },
27
+ "label2id": {
28
+ "LABEL_0": 0,
29
+ "LABEL_1": 1,
30
+ "LABEL_2": 2
31
+ },
32
+ "layer_type": "bottleneck",
33
+ "model_type": "resnet",
34
+ "num_channels": 3,
35
+ "out_features": [
36
+ "stage4"
37
+ ],
38
+ "out_indices": [
39
+ 4
40
+ ],
41
+ "problem_type": "single_label_classification",
42
+ "stage_names": [
43
+ "stem",
44
+ "stage1",
45
+ "stage2",
46
+ "stage3",
47
+ "stage4"
48
+ ],
49
+ "torch_dtype": "float32",
50
+ "transformers_version": "4.42.4"
51
+ }
eval_results.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 5.0,
3
+ "eval_loss": 0.8285718560218811,
4
+ "eval_runtime": 79.5915,
5
+ "eval_samples_per_second": 10.177,
6
+ "eval_steps_per_second": 0.641
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37fa127051fc098b066f9ca7f1cea2ec9da8e44b26064c29f3ed3772c0cddfd0
3
+ size 102482856
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 5.0,
3
+ "total_flos": 3.588142521058099e+17,
4
+ "train_loss": 1.746917755909455,
5
+ "train_runtime": 2049.8226,
6
+ "train_samples_per_second": 7.584,
7
+ "train_steps_per_second": 0.476
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.8285718560218811,
3
+ "best_model_checkpoint": "./results/resnet/tumour/checkpoint-975",
4
+ "epoch": 5.0,
5
+ "eval_steps": 500,
6
+ "global_step": 975,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 1.0,
13
+ "eval_loss": 4.508346080780029,
14
+ "eval_runtime": 77.3249,
15
+ "eval_samples_per_second": 10.475,
16
+ "eval_steps_per_second": 0.66,
17
+ "step": 195
18
+ },
19
+ {
20
+ "epoch": 2.0,
21
+ "eval_loss": 1.457480549812317,
22
+ "eval_runtime": 77.608,
23
+ "eval_samples_per_second": 10.437,
24
+ "eval_steps_per_second": 0.657,
25
+ "step": 390
26
+ },
27
+ {
28
+ "epoch": 2.564102564102564,
29
+ "grad_norm": 205.6478729248047,
30
+ "learning_rate": 9.743589743589744e-06,
31
+ "loss": 3.0791,
32
+ "step": 500
33
+ },
34
+ {
35
+ "epoch": 3.0,
36
+ "eval_loss": 0.9050098657608032,
37
+ "eval_runtime": 78.6283,
38
+ "eval_samples_per_second": 10.302,
39
+ "eval_steps_per_second": 0.649,
40
+ "step": 585
41
+ },
42
+ {
43
+ "epoch": 4.0,
44
+ "eval_loss": 0.8538194298744202,
45
+ "eval_runtime": 79.9143,
46
+ "eval_samples_per_second": 10.136,
47
+ "eval_steps_per_second": 0.638,
48
+ "step": 780
49
+ },
50
+ {
51
+ "epoch": 5.0,
52
+ "eval_loss": 0.8285718560218811,
53
+ "eval_runtime": 79.1036,
54
+ "eval_samples_per_second": 10.24,
55
+ "eval_steps_per_second": 0.645,
56
+ "step": 975
57
+ },
58
+ {
59
+ "epoch": 5.0,
60
+ "step": 975,
61
+ "total_flos": 3.588142521058099e+17,
62
+ "train_loss": 1.746917755909455,
63
+ "train_runtime": 2049.8226,
64
+ "train_samples_per_second": 7.584,
65
+ "train_steps_per_second": 0.476
66
+ }
67
+ ],
68
+ "logging_steps": 500,
69
+ "max_steps": 975,
70
+ "num_input_tokens_seen": 0,
71
+ "num_train_epochs": 5,
72
+ "save_steps": 500,
73
+ "stateful_callbacks": {
74
+ "TrainerControl": {
75
+ "args": {
76
+ "should_epoch_stop": false,
77
+ "should_evaluate": false,
78
+ "should_log": false,
79
+ "should_save": true,
80
+ "should_training_stop": true
81
+ },
82
+ "attributes": {}
83
+ }
84
+ },
85
+ "total_flos": 3.588142521058099e+17,
86
+ "train_batch_size": 16,
87
+ "trial_name": null,
88
+ "trial_params": null
89
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4e97623442022402f79f1623334ea54b7d135672ddc957c9104a54108dfe17d
3
+ size 5112