"tests/git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "de6b0021afb7a6735667d514008945922eca47b6"
Commit bae323af authored by Tong Damon Da's avatar Tong Damon Da
Browse files

add reuse parameter to RNNCells to make code compatible with tensorflow master code

parent 45b5353f
...@@ -110,7 +110,7 @@ class PTBModel(object): ...@@ -110,7 +110,7 @@ class PTBModel(object):
# different than reported in the paper. # different than reported in the paper.
def lstm_cell(): def lstm_cell():
return tf.contrib.rnn.BasicLSTMCell( return tf.contrib.rnn.BasicLSTMCell(
size, forget_bias=0.0, state_is_tuple=True) size, forget_bias=0.0, state_is_tuple=True, reuse=tf.get_variable_scope().reuse)
attn_cell = lstm_cell attn_cell = lstm_cell
if is_training and config.keep_prob < 1: if is_training and config.keep_prob < 1:
def attn_cell(): def attn_cell():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment