JianWenJun / MLDemo

This repo is all the machine learning related project codes and their corresponding blog posts at the graduate level.
320 stars 134 forks source link

the running environment of the code #2

Open whaozl opened 6 years ago

JianWenJun commented 6 years ago

@whaozl sorry, I forget to add this requirement file. the version require as follows: python 2.7 tensorflow 1.5 keras 2.1.6 gensim 3.4.0 pandas 0.22.0 sklearn 0.19.1 lightgbm 2.1.1 xgboost 0.71 jieba 0.39

whaozl commented 6 years ago

@JianWenJun I see the python3 note. but core_rnn and core_rnn_cell_impl is not found. I really want to run on python3 and tf1.8. Can you provide some steps about the running of your seq2seq code?

# in the https://github.com/JianWenJun/MLDemo/tree/master/NLP/Seq2Seq/seq2seq_attn.py
# We disable pylint because we need python3 compatibility.
from six.moves import xrange  # pylint: disable=redefined-builtin
from six.moves import zip  # pylint: disable=redefined-builtin
from tensorflow.contrib.rnn.python.ops import core_rnn
from tensorflow.contrib.rnn.python.ops import core_rnn_cell
from tensorflow.contrib.rnn.python.ops import core_rnn_cell_impl