Commit 99566f81 authored by Yanbo Liang's avatar Yanbo Liang
Browse files

Fix wrong reference in ptb_word_lm.py

parent 9b401346
...@@ -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