songyouwei / ABSA-PyTorch

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

argument 'input' (position 1) must be Tensor, not str #202

Open nlpCSir opened 3 years ago

nlpCSir commented 3 years ago

argument 'input' (position 1) must be Tensor, not str

danxu0621 commented 3 years ago

我也有这个问题 然后重新用conda install -c huggingface transformers语句安装了transformer之后运行还是这样报错 请问是我安装transformer的语句不对吗

wkk-nlp commented 2 years ago

_, pooled_output = self.bert(text_bert_indices, token_type_ids=bert_segments_ids, return_dict=False) you can write like this in bert_spc.py.