Closed binjiaqm closed 5 years ago
In my environment, I don't have any problems. Could you let me know your python, pytorch versions?
Sure. Python 3.6.8. Pytorch 1.0.1. Windows 10. May I know the versions you use?
@woojeongjin maybe share your env setup?
Sorry for the late reply. My version is Python 3.7.1 and Pytorch 1.1.0. And the other environment, I use Python 3.6.7 and Pytorch 0.4.1. My codes work on both envs.
Hi all, I got exactly the same issue as @binjiaqm does. My env is Python 3.6.7 and Pytorch 0.4.1, which is the same as @woojeongjin 's. Can you give any suggestions? Thanks.
Hi, all. @binjiaqm @woojeongjin @shanzhenren @MartinZZZ I got exactly the same issue in model.py line 90 details in #29 Could you please tell me how to fix it? Thanks a lot!
Traceback (most recent call last): File "train.py", line 223, in
train(args)
File "train.py", line 126, in train
loss = model.get_loss(batch_data, s_hist, o_hist, None)
File "X:\GitRepo\RE-Net\model.py", line 131, in getloss
loss, , , , _ = self.forward(triplets, s_hist, o_hist, graph_dict)
File "X:\GitRepo\RE-Net\model.py", line 101, in forward
self.dropout(torch.cat((self.ent_embeds[s[s_idx]], s_h, self.rel_embeds[:self.num_rels][r[s_idx]]), dim=1)))
RuntimeError: tensors used as indices must be long or byte tensors
Any ideas?