"docs/zh_cn/git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "c74b4889178467dbb642a676f1091c738146e68b"
Unverified Commit 26584e08 authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #3325 from yanboliang/ptb-rnn

Fix wrong reference in ptb_word_lm.py
parents 42b3ab23 64e2ee78
...@@ -225,15 +225,15 @@ class PTBModel(object): ...@@ -225,15 +225,15 @@ class PTBModel(object):
self._initial_state = cell.zero_state(config.batch_size, data_type()) self._initial_state = cell.zero_state(config.batch_size, data_type())
state = self._initial_state state = self._initial_state
# Simplified version of tensorflow_models/tutorials/rnn/rnn.py's rnn(). # Simplified version of tf.nn.static_rnn().
# This builds an unrolled LSTM for tutorial purposes only. # This builds an unrolled LSTM for tutorial purposes only.
# In general, use the rnn() or state_saving_rnn() from rnn.py. # In general, use tf.nn.static_rnn() or tf.nn.static_state_saving_rnn().
# #
# The alternative version of the code below is: # The alternative version of the code below is:
# #
# inputs = tf.unstack(inputs, num=num_steps, axis=1) # inputs = tf.unstack(inputs, num=self.num_steps, axis=1)
# outputs, state = tf.contrib.rnn.static_rnn(cell, inputs, # outputs, state = tf.nn.static_rnn(cell, inputs,
# initial_state=self._initial_state) # initial_state=self._initial_state)
outputs = [] outputs = []
with tf.variable_scope("RNN"): with tf.variable_scope("RNN"):
for time_step in range(self.num_steps): for time_step in range(self.num_steps):
......
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