소스 검색

Merge pull request #1131 from tongda/master

add 'reuse' parameter to RNNCells to make code compatible with tensorflow master code
Neal Wu 8 년 전
부모
커밋
c774cc95e5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tutorials/rnn/ptb/ptb_word_lm.py

+ 1 - 1
tutorials/rnn/ptb/ptb_word_lm.py

@@ -110,7 +110,7 @@ class PTBModel(object):
     # different than reported in the paper.
     def lstm_cell():
       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
     if is_training and config.keep_prob < 1:
       def attn_cell():