-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: index can't contain negative values #7
Comments
您好, |
我跑的是自己做的中文数据集,构图应该是没有负值,不过我的情感极值表用的是清华大学中文系 原博的中文情感极值表,这个极值表的范围较大应该是[-3,3]。我用这个极值表跑的glove词嵌入可以正常出结果,不过bert词嵌入就出现了上述错误。望解答,多谢! |
您好,是否有可能是BERT分词不对应问题? |
是否可以详细说明一下思路?刚入门还不太理解您说的话。 |
您好! |
多谢,回头我深入学习一下bert中文分词与词向量! |
再次感谢您的关注。如有其他问题,可以随时联系我。 |
您好,我看到了senticnet的作者也是您的这篇论文的作者之一,请问您对senticnet中的极性强度值的构造方法及原理是否了解? |
您好,我用您的代码跑中文数据集出现了以下错误,请问您知道解决方案吗?
Traceback (most recent call last):
File "E:/Sentic-GCN-main/Sentic-GCN-main/train_bert.py", line 281, in
main()
File "E:/Sentic-GCN-main/Sentic-GCN-main/train_bert.py", line 276, in main
ins = Instructor(opt)
File "E:/Sentic-GCN-main/Sentic-GCN-main/train_bert.py", line 53, in init
self.trainset = ABSADataset(opt.dataset_file['train'], tokenizer)
File "E:\Sentic-GCN-main\Sentic-GCN-main\data_utils_bert.py", line 183, in init
((0,tokenizer.max_seq_len-idx2graph[graph_id].shape[0]),(0,tokenizer.max_seq_len-idx2graph[graph_id].shape[0])), 'constant')
File "<array_function internals>", line 6, in pad
File "D:\anaconda\envs\torch16\lib\site-packages\numpy\lib\arraypad.py", line 746, in pad
pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
File "D:\anaconda\envs\torch16\lib\site-packages\numpy\lib\arraypad.py", line 517, in _as_pairs
raise ValueError("index can't contain negative values")
ValueError: index can't contain negative values
进程已结束,退出代码 1
The text was updated successfully, but these errors were encountered: