nicolas-ivanov / debug_seq2seq

[unmaintained] Make seq2seq for keras work
233 stars 86 forks source link

MemoryError when running train.py #22

Open 7oranger opened 7 years ago

7oranger commented 7 years ago

G:\Anaconda2\lib\site-packages\gensim\utils.py:840: UserWarning: detected Windows; aliasing chunkize to chunkize_serial warnings.warn("detected Windows; aliasing chunkize to chunkize_serial") G:\Anaconda2\lib\site-packages\gensim\utils.py:1015: UserWarning: Pattern library is not installed, lemmatization won't be available. warnings.warn("Pattern library is not installed, lemmatization won't be available.") INFO:summa.preprocessing.cleaner:'pattern' package not found; tag filters are not available for English Using Theano backend. INFO:lib.dialog_processor:Loading corpus data... INFO:lib.dialog_processor:H:/EclipseWorkspace/NetFault_Analysis/keras-seq2seq/debug_seq2seq-master/corpora_processed\movie_lines_cleaned_m1.txt and H:/EclipseWorkspace/NetFault_Analysis/keras-seq2seq/debug_seq2seq-master/words_index\w_idx_movie_lines_cleaned_m1.txt exist, loading files from disk INFO:main:----- INFO:lib.w2v_model.w2v:Loading model from H:/EclipseWorkspace/NetFault_Analysis/keras-seq2seq/debug_seq2seq-master/w2v_models\movie_lines_cleaned_w5_m1_v128.bin INFO:gensim.utils:loading Word2Vec object from H:/EclipseWorkspace/NetFault_Analysis/keras-seq2seq/debug_seq2seq-master/w2v_models\movie_lines_cleaned_w5_m1_v128.bin INFO:gensim.utils:setting ignored attribute syn0norm to None INFO:gensim.utils:setting ignored attribute cum_table to None INFO:gensim.utils:loaded H:/EclipseWorkspace/NetFault_Analysis/keras-seq2seq/debug_seq2seq-master/w2v_models\movie_lines_cleaned_w5_m1_v128.bin INFO:lib.w2v_model.w2v:Model "movie_lines_cleaned_w5_m1_v128.bin" has been loaded. INFO:main:----- INFO:lib.nn_model.model:Initializing NN model with the following params: INFO:lib.nn_model.model:Input dimension: 128 (token vector size) INFO:lib.nn_model.model:Hidden dimension: 128 INFO:lib.nn_model.model:Output dimension: 20001 (token dict size) INFO:lib.nn_model.model:Input seq length: 16 INFO:lib.nn_model.model:Output seq length: 6 INFO:lib.nn_model.model:Batch size: 32 G:\Anaconda2\lib\site-packages\keras\engine\topology.py:379: UserWarning: The regularizers property of layers/models is deprecated. Regularization losses are now managed via the losses layer/model property. warnings.warn('The regularizers property of layers/models ' Traceback (most recent call last): File "H:\EclipseWorkspace\NetFault_Analysis\keras-seq2seq\debug_seq2seq-master\bin\train.py", line 37, in learn() File "H:\EclipseWorkspace\NetFault_Analysis\keras-seq2seq\debug_seq2seq-master\bin\train.py", line 30, in learn nn_model = get_nn_model(token_dict_size=len(index_to_token)) File "H:\EclipseWorkspace\NetFault_Analysis\keras-seq2seq\debug_seq2seq-master\lib\nn_model\model.py", line 30, in get_nn_model depth=1 File "build\bdist.win-amd64\egg\seq2seq\models.py", line 73, in SimpleSeq2Seq File "build\bdist.win-amd64\egg\recurrentshop\engine.py", line 198, in add File "G:\Anaconda2\lib\site-packages\keras\models.py", line 332, in add output_tensor = layer(self.outputs[0]) File "G:\Anaconda2\lib\site-packages\keras\engine\topology.py", line 546, in call self.build(input_shapes[0]) File "build\bdist.win-amd64\egg\recurrentshop\cells.py", line 121, in build File "build\bdist.win-amd64\egg\recurrentshop\engine.py", line 83, in init File "G:\Anaconda2\lib\site-packages\keras\initializations.py", line 95, in orthogonal a = np.random.normal(0.0, 1.0, flat_shape) File "mtrand.pyx", line 1636, in mtrand.RandomState.normal (numpy\random\mtrand\mtrand.c:20676) File "mtrand.pyx", line 242, in mtrand.cont2_array_sc (numpy\random\mtrand\mtrand.c:7401) MemoryError

I'm using anaconda2(python2 win 64 bit cpu only) and my colleague is using ubuntu with GPU (python 2). Does anybody meet this problem? How can I solve this? Many thanks.

7633 commented 7 years ago

I suppose you should use python 3, because this code and seq2seq use python 3.

shluoyujun commented 7 years ago

hi, did you solve this problem?

hieuthehungry commented 5 years ago

Did anyone solve this problem?