#jupyter Notebook
Я пытаюсь изучать классификатор Bert с помощью https://colab.research.google.com/drive ... bdb3pt8luq> in in in in in in in in in presmare in in in in in in in in in in in in in in in in in in in in in in in presmiteabize Все предложение ..... "< /p>
В этой части у меня возникает проблема" typeerror: _tokenize ()**
input_ids = []
attention_masks = []
for sent in sentences:
encoded_dict = tokenizer.encode_plus(
sent, # Sentence to encode.
add_special_tokens = True, # Add '[CLS]' and '[SEP]'
max_length = 64, # Pad & truncate all sentences.
pad_to_max_length = True,
return_attention_mask = True, # Construct attn. masks.
return_tensors = 'pt', # Return pytorch tensors.
)
Подробнее здесь: https://stackoverflow.com/questions/638 ... ncode-plus
Проблема с использованием tokenizer.encode_plus ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение