{"action":"opened","issue":{"url":"https://api.github.com/repos/yistLin/pytorch-dual-learning/issues/8","repository_url":"https://api.github.com/repos/yistLin/pytorch-dual-learning","labels_url":"https://api.github.com/repos/yistLin/pytorch-dual-learning/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/yistLin/pytorch-dual-learning/issues/8/comments","events_url":"https://api.github.com/repos/yistLin/pytorch-dual-learning/issues/8/events","html_url":"https://github.com/yistLin/pytorch-dual-learning/issues/8","id":374731754,"node_id":"MDU6SXNzdWUzNzQ3MzE3NTQ=","number":8,"title":"KeyError: tensor(3)","user":{"login":"BattsetsegB","id":44496085,"node_id":"MDQ6VXNlcjQ0NDk2MDg1","avatar_url":"https://avatars2.githubusercontent.com/u/44496085?v=4","gravatar_id":"","url":"https://api.github.com/users/BattsetsegB","html_url":"https://github.com/BattsetsegB","followers_url":"https://api.github.com/users/BattsetsegB/followers","following_url":"https://api.github.com/users/BattsetsegB/following{/other_user}","gists_url":"https://api.github.com/users/BattsetsegB/gists{/gist_id}","starred_url":"https://api.github.com/users/BattsetsegB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BattsetsegB/subscriptions","organizations_url":"https://api.github.com/users/BattsetsegB/orgs","repos_url":"https://api.github.com/users/BattsetsegB/repos","events_url":"https://api.github.com/users/BattsetsegB/events{/privacy}","received_events_url":"https://api.github.com/users/BattsetsegB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-28T08:51:28Z","updated_at":"2018-10-28T08:51:28Z","closed_at":null,"author_association":"NONE","body":"$ ./train-dual.sh\r\nNamespace(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)\r\n\r\nloading pieces, part A\r\n  load modelA     from [data/groups/chatbot/dl_data/wmt16-small/model.wmt16-ende-small.best.bin]\r\n  load train_srcA from [data/groups/chatbot/dl_data/wmt16-dual/train-small.en]\r\n  load lmA        from [data/groups/chatbot/dl_data/lm/wmt16-en.pt]\r\n/home/..../.local/lib/python3.6/site-packages/torch/serialization.py:425: 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.\r\n  warnings.warn(msg, SourceChangeWarning)\r\n\r\nloading pieces, part B\r\n  load modelB     from [data/groups/chatbot/dl_data/wmt16-small/model.wmt16-deen-small.best.bin]\r\n  load train_srcB from [data/groups/chatbot/dl_data/wmt16-dual/train-small.de]\r\n  load lmB        from [data/groups/chatbot/dl_data/lm/wmt16-de.pt]\r\n/home/..../.local/lib/python3.6/site-packages/torch/nn/modules/rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.2 and num_layers=1\r\n  \"num_layers={}\".format(dropout, num_layers))\r\n\r\nstart of epoch 1\r\n/home/.../.local/lib/python3.6/site-packages/torch/nn/functional.py:995: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.\r\n  warnings.warn(\"nn.functional.tanh is deprecated. Use torch.tanh instead.\")\r\n/home/.../DL_Yistlin/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.\r\n  att_weight = F.softmax(att_weight)\r\n/home/..../DL_Yistlin/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.\r\n  p_t = F.log_softmax(score_t)\r\n\r\nTraceback (most recent call last):\r\n  File \"dual.py\", line 187, in <module>\r\n    dual(args)\r\n  File \"dual.py\", line 104, in dual\r\n    hyps = modelA.beam(s, beam_size=5)\r\n  File \"/home/..../DL_Yistlin/pytorch-dual-learning/nmt/model.py\", line 455, in beam\r\n    completed_hypotheses_words.append([self.vocab.tgt.id2word[w] for w in hyp])\r\n  File \"/home/..../DL_Yistlin/pytorch-dual-learning/nmt/model.py\", line 455, in <listcomp>\r\n    completed_hypotheses_words.append([self.vocab.tgt.id2word[w] for w in hyp])\r\nKeyError: tensor(3)\r\n"}}
{"actor":{"display_login":"BattsetsegB"}}