pytorch-dual-learning
pytorch-dual-learning copied to clipboard
IndexError: list index out of range
zhen@zhen-Lenovo:~/pytorch-dual-learning$ ./train-dual.sh
Namespace(alpha=0.01, cuda=False, dict=['data/groups/chatbot/dl_data/lm/dict.en.pkl', 'data/groups/chatbot/dl_data/lm/dict.de.pkl'], lm=['data/groups/chatbot/dl_data/lm/wmt16-en.pt', 'data/groups/chatbot/dl_data/lm/wmt16-de.pt'], log_every=5, model=['modelA', 'modelB'], nmt=['data/groups/chatbot/dl_data/wmt16-small/model.wmt16-ende-small.best.bin', 'data/groups/chatbot/dl_data/wmt16-small/model.wmt16-deen-small.best.bin'], save_n_iter=400, src=['data/groups/chatbot/dl_data/wmt16-dual/train-small.en', 'data/groups/chatbot/dl_data/wmt16-dual/train-small.de'], start_iter=0)
loading pieces, part A
load modelA from [data/groups/chatbot/dl_data/wmt16-small/model.wmt16-ende-small.best.bin]
load train_srcA from [data/groups/chatbot/dl_data/wmt16-dual/train-small.en]
load lmA from [data/groups/chatbot/dl_data/lm/wmt16-en.pt]
/home/zhen/.local/lib/python3.6/site-packages/torch/serialization.py:316: SourceChangeWarning: source code of class 'model.RNNModel' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhen/.local/lib/python3.6/site-packages/torch/serialization.py:316: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhen/.local/lib/python3.6/site-packages/torch/serialization.py:316: SourceChangeWarning: source code of class 'torch.nn.modules.sparse.Embedding' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhen/.local/lib/python3.6/site-packages/torch/serialization.py:316: SourceChangeWarning: source code of class 'torch.nn.modules.rnn.LSTM' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/zhen/.local/lib/python3.6/site-packages/torch/serialization.py:316: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
loading pieces, part B
load modelB from [data/groups/chatbot/dl_data/wmt16-small/model.wmt16-deen-small.best.bin]
load train_srcB from [data/groups/chatbot/dl_data/wmt16-dual/train-small.de]
load lmB from [data/groups/chatbot/dl_data/lm/wmt16-de.pt]
start of epoch 1
/home/zhen/pytorch-dual-learning/nmt/model.py:490: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
att_weight = F.softmax(att_weight)
/home/zhen/pytorch-dual-learning/nmt/model.py:400: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
p_t = F.log_softmax(score_t)
Traceback (most recent call last):
File "dual.py", line 197, in