Skip to content

Instantly share code, notes, and snippets.

@mumoshu
Created September 25, 2018 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mumoshu/9f611543119e52821c3a70230d12e60e to your computer and use it in GitHub Desktop.
Save mumoshu/9f611543119e52821c3a70230d12e60e to your computer and use it in GitHub Desktop.
try:
tf.nn.seq2seq = tf.contrib.legacy_seq2seq
tf.nn.rnn_cell = tf.contrib.rnn
tf.nn.rnn_cell.GRUCell = tf.contrib.rnn.GRUCell
tf.nn.rnn = tf.contrib.rnn.static_rnn
# https://github.com/tensorflow/tensorflow/issues/7032
tf.sub = tf.subtract
# https://stackoverflow.com/questions/47296969/valueerror-variable-rnn-basic-rnn-cell-kernel-already-exists-disallowed-did-y
tf.reset_default_graph()
print("TensorFlow's version : 1.0 (or more)")
except:
print("TensorFlow's version : 0.12")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment