Seq2Seq installation and problem solving

Windows 10 installation

seq2seq official website tutorial
Need environment: Python 2.7 or Python 3.5, TensorFlow 1.0

git clone https://github.com/google/seq2seq.git
cd seq2seq
# Install package and dependencies
pip install -e .

test

python -m unittest seq2seq.test.pipeline_test

problem appear

Question one

seq2seq/contrib/seq2seq/helper.py reports: bernoulli, categorical cannot be imported, modify helper.py:

from tensorflow.python.ops.distributions import bernoulli
from tensorflow.python.ops.distributions import categorical

Question two

AttributeError: module'tensorflow.contrib.tfprof' has no attribute'model_analyzer' as shown in the
figure: Change
Insert picture description hereTensorFlow 1.2.0 to 1.6.0 and disappear...

Question three

AttributeError: module'tensorflow.python.platform.flags' has no attribute'_FlagValues'
Solution : Modify the seq2seq/test/pipeline_test.py file:
Insert picture description here

Question four

PermissionError: [Errno 13] Permission denied:'C:\Users\Computer\AppData\Local\Temp\tmph7wo8mp3' permission error appears after modification
as shown in the figure:
Insert picture description here

Linux installation

surroundings

Ubuntu,TensorFlow1.6.0,python3.5

Question one

AttributeError: module ‘tensorflow.python.platform.flags’ has no attribute ‘_FlagValues’
如图:
Insert picture description here

Question two

ImportError: No module
named'yaml ' failed to install yaml with conda, pip succeeded

pip install pyyaml

Question three

ImportError: No module named ‘matplotlib’

pip install matplotlib

Guess you like

Origin blog.csdn.net/qq_38879305/article/details/112275477