- Python
- PyTorch
- PyTorch Ignite
- TorchText
- Khaiii API
- Huggingface (for KcBERT)
- Format Input file 형식: (tag sentence) 탭으로 분리된 파일 (.tsv) My data: 63437개의 data (논문 태그, 논문 문장)
-
Tokenization 카카오 형태소 분석기 Khaiii Tokenizer을 이용해 문장 토큰화
-
Dataset shuffle and Split, Cross Validation Train set : Test set = 8:2 Validation set: Train의 20%
1. train.py cnn, rnn 모두 학습
2. classify.py
(Best CNN + Best RNN)/2
- 저장된 cnn 모델 중 가장 좋은 성능을 가진 모델과 rnn 모델 중 가장 좋은 성능을 가진 best 모델 모두 추론 적용
- 추론 적용 결과 값들의 평균 구해서 k 번째로 높은 순위를 가진 라벨과 문장 출력 (top-k 설정)
1. train.py
Pre-trained BERT model의 weights 로드 --> fine-tuning 수행
2. classify.py
- Pre-trained BERT model로 fine-tuning한 최종 모델에 추론 적용
- 추론 적용 결과 값들 중 k번째로 높은 순위를 가진 라벨과 문장 출력 (top-k 설정)
- 실행 결과 (라벨, 문장)
- 학습 조건 및 Accuracy