Comments (6)
建议把错误报全
from spn4re.
=== Epoch 0 train ===
Traceback (most recent call last):
File "C:/Users/kdecm/Desktop/临时文件/SPN4RE-main/main.py", line 100, in
trainer.train_model()
File "C:\Users\kdecm\Desktop\临时文件\SPN4RE-main\trainer\trainer.py", line 77, in train_model
loss, _ = self.model(input_ids, attention_mask, targets)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "C:\Users\kdecm\Desktop\临时文件\SPN4RE-main\models\setpred4RE.py", line 22, in forward
last_hidden_state, pooler_output = self.encoder(input_ids, attention_mask)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "C:\Users\kdecm\Desktop\临时文件\SPN4RE-main\models\seq_encoder.py", line 17, in forward
last_hidden_state, pooler_output = self.bert(input_ids, attention_mask=attention_mask)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "D:\anaconda3\envs\python37\lib\site-packages\transformers\modeling_bert.py", line 783, in forward
input_ids=input_ids, position_ids=position_ids, token_type_ids=token_type_ids, inputs_embeds=inputs_embeds
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "D:\anaconda3\envs\python37\lib\site-packages\transformers\modeling_bert.py", line 174, in forward
position_embeddings = self.position_embeddings(position_ids)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "D:\anaconda3\envs\python37\lib\site-packages\torch\nn\functional.py", line 1724, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self
from spn4re.
torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) 这里出错了,检查一下input_ids
from spn4re.
貌似没啥问题呢
from spn4re.
解决了。把data/generated_data目录下的文件删除了就好了 . 感谢大佬!
from spn4re.
如果我想进行在线测试,输入句子输出所有的三元组,我应该怎么做?
from spn4re.
Related Issues (20)
- The paper does not match the code? HOT 2
- 代码超参数错误 HOT 2
- Unexpected NYT results. HOT 5
- 入参能否加一个说明?
- 评价指标的代码是否有问题?召回率可能大于1 HOT 2
- 有关GPU训练的一些问题 HOT 4
- WebNLG实验结果的一点疑问 HOT 2
- 报错
- decoder端m个learnable embedding是如何学习到不同的三元组信息的
- 请求论文中结果的参数设置 HOT 5
- 模型加载报错
- 论文中的null关系,代码并没直接填充
- Is it possible to use SP4RE through huggingface?
- 文中的对比实验
- 使用自己数据报错 HOT 5
- No predictions by the model HOT 1
- Predict a sentence with SPN4RE model
- 关于论文Table 4的实验结果问题 HOT 2
- 您好!想请教一下二部匹配损失和交叉熵损失的问题。 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spn4re.