Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

IndexError: index out of range in self #179

Open
yyz159756 opened this issue Sep 18, 2020 · 0 comments
Open

IndexError: index out of range in self #179

yyz159756 opened this issue Sep 18, 2020 · 0 comments

Comments

@yyz159756
Copy link

I load the src_emb “wiki.lo.vec” occur a error:
src_emb = self.src_emb(Variable(src_ids, volatile=True))
Traceback (most recent call last):
File "", line 1, in
File "D:\IDE\pycharm\PyCharm 2018.3.5\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\IDE\pycharm\PyCharm 2018.3.5\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/work_place/python/MUSE-master/unsupervised.py", line 115, in
trainer.dis_step(stats)
File "E:\work_place\python\MUSE-master\src\trainer.py", line 95, in dis_step
x, y = self.get_dis_xy(volatile=True)
File "E:\work_place\python\MUSE-master\src\trainer.py", line 74, in get_dis_xy
src_emb = self.src_emb(Variable(src_ids, volatile=True))
File "D:\env\python37\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\env\python37\lib\site-packages\torch\nn\modules\sparse.py", line 126, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "D:\env\python37\lib\site-packages\torch\nn\functional.py", line 1815, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
IndexError: index out of range in self

Has anyone knows what happened with it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant