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
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?