Update README.md
Browse files
README.md
CHANGED
|
@@ -15,8 +15,6 @@ tags:
|
|
| 15 |
|
| 16 |
# Load model directly
|
| 17 |
|
| 18 |
-
"Load Model"
|
| 19 |
-
|
| 20 |
```python
|
| 21 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 22 |
|
|
@@ -24,6 +22,23 @@ tokenizer = AutoTokenizer.from_pretrained("Marzu39/bert-turkish-text-classificat
|
|
| 24 |
model = AutoModelForSequenceClassification.from_pretrained("Marzu39/bert-turkish-text-classification")
|
| 25 |
|
| 26 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
#### Summary
|
| 28 |
|
| 29 |
Sentiment classification based on Transformers is a topic that has recently been widely studied in
|
|
|
|
| 15 |
|
| 16 |
# Load model directly
|
| 17 |
|
|
|
|
|
|
|
| 18 |
```python
|
| 19 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 20 |
|
|
|
|
| 22 |
model = AutoModelForSequenceClassification.from_pretrained("Marzu39/bert-turkish-text-classification")
|
| 23 |
|
| 24 |
```
|
| 25 |
+
# Training hyperparameters
|
| 26 |
+
training_args = TrainingArguments(
|
| 27 |
+
do_train=True,
|
| 28 |
+
do_eval=True,
|
| 29 |
+
num_train_epochs=3,
|
| 30 |
+
per_device_train_batch_size=8,
|
| 31 |
+
per_device_eval_batch_size=16,
|
| 32 |
+
warmup_steps=100,
|
| 33 |
+
weight_decay=0.01,
|
| 34 |
+
logging_strategy='steps',
|
| 35 |
+
logging_steps=50,
|
| 36 |
+
evaluation_strategy="epoch",
|
| 37 |
+
eval_steps=50,
|
| 38 |
+
save_strategy="epoch",
|
| 39 |
+
fp16=False,
|
| 40 |
+
load_best_model_at_end=True
|
| 41 |
+
)
|
| 42 |
#### Summary
|
| 43 |
|
| 44 |
Sentiment classification based on Transformers is a topic that has recently been widely studied in
|