File size: 1,518 Bytes
76ee57c
 
 
 
 
 
 
 
 
 
 
 
 
3ffc0e2
 
76ee57c
 
 
2f1f377
76ee57c
 
 
 
2b05e1c
2f3cb15
25c0033
76ee57c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
language:
  - ko
tags:
- generated_from_keras_callback
model-index:
- name: RoBERTa-large-Detection-P2G
  results: []
---

# RoBERTa-large-Detection-P2G


์ด ๋ชจ๋ธ์€ klue/roberta-large์„ ๊ตญ๋ฆฝ ๊ตญ์–ด์› ์‹ ๋ฌธ ๋ง๋ญ‰์น˜ 5๋งŒ๊ฐœ์˜ ๋ฌธ์žฅ์„ 2021์„ g2pK๋กœ ํ›ˆ๋ จ์‹œ์ผœ G2P๋œ ๋ฐ์ดํ„ฐ๋ฅผ ํƒ์ง€ํ•ฉ๋‹ˆ๋‹ค.<br>
git : https://github.com/taemin6697<br>

## Usage
```python
from transformers import AutoTokenizer, RobertaForSequenceClassification
import torch
import numpy as np

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model_dir = "kfkas/RoBERTa-large-Detection-G2P"
tokenizer = AutoTokenizer.from_pretrained('klue/roberta-large')
model = RobertaForSequenceClassification.from_pretrained(model_dir).to(device)

text = "์›”๋“œ์ปค ํŒŒ๋‚˜์€ํ–‰ ๋Œ€ํ‘œํ‹ฐ๋ฉ” ํ–‰์šฐ๋Šฌ ์ด๋‹ฌ๋Ÿฌ ์ด์˜์˜์žฅ ์„ ๋ฌผ"
with torch.no_grad():
    x = tokenizer(text, padding='max_length', truncation=True, return_tensors='pt', max_length=128)
    y_pred = model(x["input_ids"].to(device))
    logits = y_pred.logits
    y_pred = logits.detach().cpu().numpy()
    y = np.argmax(y_pred)
    print(y)
    #1
```


## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- optimizer: None
- training_precision: float16
### Training results
### Framework versions
- Transformers 4.22.1
- TensorFlow 2.10.0
- Datasets 2.5.1
- Tokenizers 0.12.1