Atharva1244 commited on
Commit
60d5209
·
verified ·
1 Parent(s): 1c12619

Upload TFBertForSequenceClassification

Browse files
Files changed (3) hide show
  1. README.md +62 -0
  2. config.json +35 -0
  3. tf_model.h5 +3 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: bert-base-uncased
5
+ tags:
6
+ - generated_from_keras_callback
7
+ model-index:
8
+ - name: hate_speech_classifier
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
13
+ probably proofread and complete it, then remove this comment. -->
14
+
15
+ # hate_speech_classifier
16
+
17
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on an unknown dataset.
18
+ It achieves the following results on the evaluation set:
19
+ - Train Loss: 0.0710
20
+ - Train Accuracy: 0.9765
21
+ - Train Precision: 0.9207
22
+ - Train Recall: 0.9921
23
+ - Validation Loss: 0.3637
24
+ - Validation Accuracy: 0.9016
25
+ - Validation Precision: 0.8507
26
+ - Validation Recall: 0.9371
27
+ - Epoch: 2
28
+
29
+ ## Model description
30
+
31
+ More information needed
32
+
33
+ ## Intended uses & limitations
34
+
35
+ More information needed
36
+
37
+ ## Training and evaluation data
38
+
39
+ More information needed
40
+
41
+ ## Training procedure
42
+
43
+ ### Training hyperparameters
44
+
45
+ The following hyperparameters were used during training:
46
+ - optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 3720, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
47
+ - training_precision: float32
48
+
49
+ ### Training results
50
+
51
+ | Train Loss | Train Accuracy | Train Precision | Train Recall | Validation Loss | Validation Accuracy | Validation Precision | Validation Recall | Epoch |
52
+ |:----------:|:--------------:|:---------------:|:------------:|:---------------:|:-------------------:|:--------------------:|:-----------------:|:-----:|
53
+ | 0.1715 | 0.9374 | 0.8596 | 0.9650 | 0.3057 | 0.9024 | 0.7826 | 0.9463 | 0 |
54
+ | 0.1203 | 0.9572 | 0.8813 | 0.9846 | 0.3223 | 0.9034 | 0.8117 | 0.9455 | 1 |
55
+ | 0.0710 | 0.9765 | 0.9207 | 0.9921 | 0.3637 | 0.9016 | 0.8507 | 0.9371 | 2 |
56
+
57
+
58
+ ### Framework versions
59
+
60
+ - Transformers 4.48.3
61
+ - TensorFlow 2.18.0
62
+ - Tokenizers 0.21.0
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1",
15
+ "2": "LABEL_2"
16
+ },
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 3072,
19
+ "label2id": {
20
+ "LABEL_0": 0,
21
+ "LABEL_1": 1,
22
+ "LABEL_2": 2
23
+ },
24
+ "layer_norm_eps": 1e-12,
25
+ "max_position_embeddings": 512,
26
+ "model_type": "bert",
27
+ "num_attention_heads": 12,
28
+ "num_hidden_layers": 12,
29
+ "pad_token_id": 0,
30
+ "position_embedding_type": "absolute",
31
+ "transformers_version": "4.48.3",
32
+ "type_vocab_size": 2,
33
+ "use_cache": true,
34
+ "vocab_size": 30522
35
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62cdd229f4073bd6a581732db489da775b1c0308194c108b74d5352ee2ba5fc2
3
+ size 438226204