{"action":"created","issue":{"url":"https://api.github.com/repos/orenmel/context2vec/issues/12","repository_url":"https://api.github.com/repos/orenmel/context2vec","labels_url":"https://api.github.com/repos/orenmel/context2vec/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/orenmel/context2vec/issues/12/comments","events_url":"https://api.github.com/repos/orenmel/context2vec/issues/12/events","html_url":"https://github.com/orenmel/context2vec/issues/12","id":294827596,"number":12,"title":"AttributeError: 'module' object has no attribute 'EmbedID'","user":{"login":"hedgy123","id":6642667,"avatar_url":"https://avatars1.githubusercontent.com/u/6642667?v=4","gravatar_id":"","url":"https://api.github.com/users/hedgy123","html_url":"https://github.com/hedgy123","followers_url":"https://api.github.com/users/hedgy123/followers","following_url":"https://api.github.com/users/hedgy123/following{/other_user}","gists_url":"https://api.github.com/users/hedgy123/gists{/gist_id}","starred_url":"https://api.github.com/users/hedgy123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedgy123/subscriptions","organizations_url":"https://api.github.com/users/hedgy123/orgs","repos_url":"https://api.github.com/users/hedgy123/repos","events_url":"https://api.github.com/users/hedgy123/events{/privacy}","received_events_url":"https://api.github.com/users/hedgy123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-06T16:37:32Z","updated_at":"2018-02-13T18:09:23Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n  I am trying to train a model on my corpus.  So I did:\r\n\r\n    python context2vec/train/corpus_by_sent_length.py my_file\r\n\r\n which went fine, and then:\r\n\r\n    python context2vec/train/train_context2vec.py -i my_file.DIR -c lstm --deep yes -t 3 --dropout 0.0 -u 300 -e 10 -p 0.75 -b 100 -g -1\r\n\r\n  (I don't have a GPU-enabled machine).  Here's what I get:\r\n\r\nGPU: -1\r\nMinibatch-size: 100\r\nContext type: lstm\r\nDeep: True\r\nDropout: 0.0\r\nTrimfreq: 3\r\nNS Power: 0.75\r\n\r\nn_vocab: 62690\r\ncorpus size: 95350988\r\nTraceback (most recent call last):\r\n  File \"context2vec/train/train_context2vec.py\", line 114, in <module>\r\n    model = BiLstmContext(args.deep, args.gpu, reader.word2index, context_word_units, lstm_hidden_units, target_word_units, loss_func, True, args.dropout)\r\n  File \"/USER_DIR_NOT_SHOWN/anaconda2/envs/py27base/lib/python2.7/site-packages/context2vec/common/context_models.py\", line 76, in __init__\r\n    l2r_embedding=F.EmbedID(n_vocab, in_units)\r\nAttributeError: 'module' object has no attribute 'EmbedID'\r\n\r\n   Could you please help me understand how to make it work correctly?  Thank you!\r\n"},"comment":{"url":"https://api.github.com/repos/orenmel/context2vec/issues/comments/365353479","html_url":"https://github.com/orenmel/context2vec/issues/12#issuecomment-365353479","issue_url":"https://api.github.com/repos/orenmel/context2vec/issues/12","id":365353479,"user":{"login":"14chanwa","id":12595183,"avatar_url":"https://avatars0.githubusercontent.com/u/12595183?v=4","gravatar_id":"","url":"https://api.github.com/users/14chanwa","html_url":"https://github.com/14chanwa","followers_url":"https://api.github.com/users/14chanwa/followers","following_url":"https://api.github.com/users/14chanwa/following{/other_user}","gists_url":"https://api.github.com/users/14chanwa/gists{/gist_id}","starred_url":"https://api.github.com/users/14chanwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/14chanwa/subscriptions","organizations_url":"https://api.github.com/users/14chanwa/orgs","repos_url":"https://api.github.com/users/14chanwa/repos","events_url":"https://api.github.com/users/14chanwa/events{/privacy}","received_events_url":"https://api.github.com/users/14chanwa/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T18:09:23Z","updated_at":"2018-02-13T18:09:23Z","author_association":"NONE","body":"Hi, I had the same issue ; actually I couldn't install Chainer 1.7 (some cython issues). A hotfix is to change\r\n        l2r_embedding=F.EmbedID(n_vocab, in_units)\r\n        r2l_embedding=F.EmbedID(n_vocab, in_units)\r\nto \r\n        l2r_embedding=L.EmbedID(n_vocab, in_units)\r\n        r2l_embedding=L.EmbedID(n_vocab, in_units)\r\n(looks like these functions changed package since then)"}}
{"actor":{"display_login":"14chanwa"}}