Skip to content

AttributeError: 'module' object has no attribute 'EmbedID' #12

@hedgy123

Description

@hedgy123

Hi,
I am trying to train a model on my corpus. So I did:

python context2vec/train/corpus_by_sent_length.py my_file

which went fine, and then:

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

(I don't have a GPU-enabled machine). Here's what I get:

GPU: -1
Minibatch-size: 100
Context type: lstm
Deep: True
Dropout: 0.0
Trimfreq: 3
NS Power: 0.75

n_vocab: 62690
corpus size: 95350988
Traceback (most recent call last):
File "context2vec/train/train_context2vec.py", line 114, in
model = BiLstmContext(args.deep, args.gpu, reader.word2index, context_word_units, lstm_hidden_units, target_word_units, loss_func, True, args.dropout)
File "/USER_DIR_NOT_SHOWN/anaconda2/envs/py27base/lib/python2.7/site-packages/context2vec/common/context_models.py", line 76, in init
l2r_embedding=F.EmbedID(n_vocab, in_units)
AttributeError: 'module' object has no attribute 'EmbedID'

Could you please help me understand how to make it work correctly? Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions