Closed SeekPoint closed 7 years ago
it fixed by change
andy1028@andy1028-Envy:/media/andy1028/data1t/os_prj/github/debug_seq2seq$ git diff diff --git a/lib/nn_model/model.py b/lib/nn_model/model.py index 3f229a0..1f86c41 100644 --- a/lib/nn_model/model.py +++ b/lib/nn_model/model.py @@ -1,7 +1,7 @@ import os.path
from keras.models import Sequential -from seq2seq.models import SimpleSeq2seq +from seq2seq.models import SimpleSeq2Seq
from configs.config import TOKEN_REPRESENTATION_SIZE, HIDDEN_LAYER_DIMENSION, SAMPLES_BATCH_SIZE, \ INPUT_SEQUENCE_LENGTH, ANSWER_MAX_TOKEN_LENGTH, NN_MODEL_PATH @@ -20,7 +20,7 @@ def get_nn_model(token_dict_size): _logger.info('Batch size: %s' % SAMPLES_BATCH_SIZE)
model = Sequential()
andy1028@andy1028-Envy:/media/andy1028/data1t/os_prj/github/debug_seq2seq$ python bin/train.py INFO:gensim.utils: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 TensorFlow backend. I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally Traceback (most recent call last): File "bin/train.py", line 10, in from lib.nn_model.model import get_nn_model File "/media/andy1028/data1t/os_prj/github/debug_seq2seq/lib/nn_model/model.py", line 4, in from seq2seq.models import SimpleSeq2seq ImportError: cannot import name SimpleSeq2seq
I had the done:
andy1028@andy1028-Envy:/media/andy1028/data1t/os_prj/github/debug_seq2seq/seq2seq$ git remote -v origin https://github.com/farizrahman4u/seq2seq.git (fetch) origin https://github.com/farizrahman4u/seq2seq.git (push) andy1028@andy1028-Envy:/media/andy1028/data1t/os_prj/github/debug_seq2seq/seq2seq$ sudo python3 setup.py install running install running bdist_egg running egg_info writing seq2seq.egg-info/PKG-INFO writing requirements to seq2seq.egg-info/requires.txt writing dependency_links to seq2seq.egg-info/dependency_links.txt writing top-level names to seq2seq.egg-info/top_level.txt reading manifest file 'seq2seq.egg-info/SOURCES.txt' writing manifest file 'seq2seq.egg-info/SOURCES.txt' .....