Closed SHK92 closed 3 years ago
找到原因了吗
运行源码,会在Trainer.train_one_step()时, File ".\OpenKE\openke\module\model\TransH.py", line 83, in forward h = self.ent_embeddings(batch_h) File ".\Anaconda2\envs\KG_Models_MXnet\lib\site-packages\torch\nn\modules\module.py", line 551, in call result = self.forward(*input, **kwargs) File ".\Anaconda2\envs\KG_Models_MXnet\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward self.norm_type, self.scale_grad_by_freq, self.sparse) File ".\Anaconda2\envs\KG_Models_MXnet\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
Are you running on a window system? Some packages used in C++ do not support compilation on windows. You can use it on Linux system.
运行源码,会在Trainer.train_one_step()时, File ".\OpenKE\openke\module\model\TransH.py", line 83, in forward h = self.ent_embeddings(batch_h) File ".\Anaconda2\envs\KG_Models_MXnet\lib\site-packages\torch\nn\modules\module.py", line 551, in call result = self.forward(*input, **kwargs) File ".\Anaconda2\envs\KG_Models_MXnet\lib\site-packages\torch\nn\modules\sparse.py", line 114, in forward self.norm_type, self.scale_grad_by_freq, self.sparse) File ".\Anaconda2\envs\KG_Models_MXnet\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