songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
MIT License
2.01k stars 524 forks source link

question about the usage of huggingface BertModel #137

Closed zfj1998 closed 4 years ago

zfj1998 commented 4 years ago

As described in huggingface's document, BertModel takes at least three arguments for sentence-pair classification. image

But I found codes in bert_spc.py not working that way. And it's confusing that input_ids and attention_mask should be the first two arguments, but it seems like you have passed input_ids and token_type_ids for the first two arguments. image

zfj1998 commented 4 years ago

sorry, I forgot the diffrence between pytorch_transformers and transformers