XuezheMax / NeuroNLP2

Deep neural models for core NLP tasks (Pytorch version)
GNU General Public License v3.0
441 stars 89 forks source link

RuntimeError: maximum recursion depth exceeded #33

Closed chanyixialex closed 5 years ago

chanyixialex commented 6 years ago

@XuezheMax it occurs when program constructs network. can you help me?Thanks!

loading embedding: glove from data/glove/glove.6B/glove.6B.100d.gz 2018-11-25 19:55:40,169 - NERCRF - INFO - Creating Alphabets 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Word Alphabet Size (Singleton): 23598 (8122) 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Character Alphabet Size: 86 2018-11-25 19:55:40,197 - Create Alphabets - INFO - POS Alphabet Size: 47 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Chunk Alphabet Size: 19 2018-11-25 19:55:40,197 - Create Alphabets - INFO - NER Alphabet Size: 10 2018-11-25 19:55:40,197 - NERCRF - INFO - Word Alphabet Size: 23598 2018-11-25 19:55:40,197 - NERCRF - INFO - Character Alphabet Size: 86 2018-11-25 19:55:40,197 - NERCRF - INFO - POS Alphabet Size: 47 2018-11-25 19:55:40,197 - NERCRF - INFO - Chunk Alphabet Size: 19 2018-11-25 19:55:40,197 - NERCRF - INFO - NER Alphabet Size: 10 2018-11-25 19:55:40,197 - NERCRF - INFO - Reading Data ./neuronlp2/io/conll03_data.py:363: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. words = Variable(torch.from_numpy(wid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:364: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. chars = Variable(torch.from_numpy(cid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:365: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. pos = Variable(torch.from_numpy(pid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:366: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. chunks = Variable(torch.from_numpy(chid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:367: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. ners = Variable(torch.from_numpy(nid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:368: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. masks = Variable(torch.from_numpy(masks), volatile=volatile) ./neuronlp2/io/conll03_data.py:369: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. single = Variable(torch.from_numpy(single), volatile=volatile) Reading data from data/conll2003/english/eng.train.bio.conll reading data: 10000 Total number of data: 14987 Reading data from data/conll2003/english/eng.dev.bio.conll Total number of data: 3466 Reading data from data/conll2003/english/eng.test.bio.conll Total number of data: 3684 oov: 339 2018-11-25 19:55:48,096 - NERCRF - INFO - constructing network... Traceback (most recent call last): File "examples/NERCRF.py", line 248, in main() File "examples/NERCRF.py", line 146, in main tag_space=tag_space, embedd_word=word_table, p_in=p_in, p_out=p_out, p_rnn=p_rnn, bigram=bigram, initializer=initializer) File "./neuronlp2/models/sequence_labeling.py", line 201, in init p_in=p_in, p_out=p_out, p_rnn=p_rnn, initializer=initializer) File "./neuronlp2/models/sequence_labeling.py", line 16, in init self.word_embedd = Embedding(num_words, word_dim, init_embedding=embedd_word) File "./neuronlp2/nn/modules/sparse.py", line 53, in init self.reset_parameters(init_embedding) File "./neuronlp2/nn/modules/sparse.py", line 60, in reset_parameters assign_tensor(self.weight, init_embedding) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val)

XuezheMax commented 6 years ago

I think it is because you were using pytorch 0.4. Please switch to the corresponding branch.

Sent from my iPhone

On Nov 25, 2018, at 6:54 AM, Alex Chan notifications@github.com wrote:

@XuezheMax it occurs when program constructs network. can you help me?Thanks!

loading embedding: glove from data/glove/glove.6B/glove.6B.100d.gz 2018-11-25 19:55:40,169 - NERCRF - INFO - Creating Alphabets 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Word Alphabet Size (Singleton): 23598 (8122) 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Character Alphabet Size: 86 2018-11-25 19:55:40,197 - Create Alphabets - INFO - POS Alphabet Size: 47 2018-11-25 19:55:40,197 - Create Alphabets - INFO - Chunk Alphabet Size: 19 2018-11-25 19:55:40,197 - Create Alphabets - INFO - NER Alphabet Size: 10 2018-11-25 19:55:40,197 - NERCRF - INFO - Word Alphabet Size: 23598 2018-11-25 19:55:40,197 - NERCRF - INFO - Character Alphabet Size: 86 2018-11-25 19:55:40,197 - NERCRF - INFO - POS Alphabet Size: 47 2018-11-25 19:55:40,197 - NERCRF - INFO - Chunk Alphabet Size: 19 2018-11-25 19:55:40,197 - NERCRF - INFO - NER Alphabet Size: 10 2018-11-25 19:55:40,197 - NERCRF - INFO - Reading Data ./neuronlp2/io/conll03_data.py:363: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. words = Variable(torch.from_numpy(wid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:364: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. chars = Variable(torch.from_numpy(cid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:365: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. pos = Variable(torch.from_numpy(pid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:366: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. chunks = Variable(torch.from_numpy(chid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:367: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. ners = Variable(torch.from_numpy(nid_inputs), volatile=volatile) ./neuronlp2/io/conll03_data.py:368: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. masks = Variable(torch.from_numpy(masks), volatile=volatile) ./neuronlp2/io/conll03_data.py:369: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. single = Variable(torch.from_numpy(single), volatile=volatile) Reading data from data/conll2003/english/eng.train.bio.conll reading data: 10000 Total number of data: 14987 Reading data from data/conll2003/english/eng.dev.bio.conll Total number of data: 3466 Reading data from data/conll2003/english/eng.test.bio.conll Total number of data: 3684 oov: 339 2018-11-25 19:55:48,096 - NERCRF - INFO - constructing network... Traceback (most recent call last): File "examples/NERCRF.py", line 248, in main() File "examples/NERCRF.py", line 146, in main tag_space=tag_space, embedd_word=word_table, p_in=p_in, p_out=p_out, p_rnn=p_rnn, bigram=bigram, initializer=initializer) File "./neuronlp2/models/sequence_labeling.py", line 201, in init p_in=p_in, p_out=p_out, p_rnn=p_rnn, initializer=initializer) File "./neuronlp2/models/sequence_labeling.py", line 16, in init self.word_embedd = Embedding(num_words, word_dim, init_embedding=embedd_word) File "./neuronlp2/nn/modules/sparse.py", line 53, in init self.reset_parameters(init_embedding) File "./neuronlp2/nn/modules/sparse.py", line 60, in reset_parameters assign_tensor(self.weight, init_embedding) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val) File "./neuronlp2/nn/init.py", line 17, in assign_tensor assign_tensor(tensor.data, val)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chanyixialex commented 6 years ago

thanks!