Inflearn Community Q&A
네이버 영화리뷰 파인튜닝 질문드려요
Written on
·
305
0
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
Quiz
What is the core idea of using the BERT model?
Training a model from scratch using only the given data
Transfer learning using model parameters learned from other problems as initial values
Improving training efficiency by minimizing model size
Converting text data into image data for processing
Answer 1
0
안녕하세요~. 반갑습니다.
bert 모델에 넣기 전에 아래 코드에서 토크나이징을 진행한 후 bert 모델에 들어가게 됩니다.
text_test = ['지루하지는 않은데 완전 막장임... 돈주고 보기에는....']
text_preprocessed = bert_preprocess_model(text_test)
print(f'Keys : {list(text_preprocessed.keys())}')
print(f'Shape : {text_preprocessed["input_word_ids"].shape}')
print(f'Word Ids : {text_preprocessed["input_word_ids"][0, :12]}')
print(f'Input Mask : {text_preprocessed["input_mask"][0, :12]}')
print(f'Type Ids : {text_preprocessed["input_type_ids"][0, :12]}')
위 코드아래에서 text_preprocessed값이 bert 모델의 인풋으로 들어가는 모습을 확인하실 수 있습니다.
그럼 좋은 하루되세요~.
감사합니다.





