Skip to content

Commit f062d14

Browse files
author
Mofan Zhou
committed
tf RNN example2
1 parent 89c079e commit f062d14

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tensorflowTUT/tf20_RNN3/for_practicing.py renamed to tensorflowTUT/tf20_RNN2.2/for_practicing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def _bias_variable(self, shape, name='biases'):
9999
sess = tf.Session()
100100
merged = tf.merge_all_summaries()
101101
writer = tf.train.SummaryWriter("logs", sess.graph)
102-
# relocate to the local dir and run this line to view it on Chrome:
103-
# $ tensorboard --logdir=logs
102+
# relocate to the local dir and run this line to view it on Chrome (http://0.0.0.0:6006/):
103+
# $ tensorboard --logdir='logs'
104104

105105
sess.run(tf.initialize_all_variables())
106106
plt.ion()

tensorflowTUT/tf20_RNN3/full_code.py renamed to tensorflowTUT/tf20_RNN2.2/full_code.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ def _bias_variable(self, shape, name='biases'):
117117
model = LSTMRNN(TIME_STEPS, INPUT_SIZE, OUTPUT_SIZE, CELL_SIZE, BATCH_SIZE)
118118
sess = tf.Session()
119119
merged = tf.merge_all_summaries()
120-
writer = tf.train.SummaryWriter("tmp/logs", sess.graph)
120+
writer = tf.train.SummaryWriter("logs", sess.graph)
121121
sess.run(tf.initialize_all_variables())
122-
# relocate to the local dir and run this line to view it on Chrome:
123-
# $ tensorboard --logdir=logs
122+
# relocate to the local dir and run this line to view it on Chrome (http://0.0.0.0:6006/):
123+
# $ tensorboard --logdir='logs'
124124

125125
plt.ion()
126126
plt.show()
@@ -144,10 +144,10 @@ def _bias_variable(self, shape, name='biases'):
144144
feed_dict=feed_dict)
145145

146146
# plotting
147-
plt.plot(xs[0, :], res[0].flatten(), 'r', xs[0, :], pred.flatten()[:TIME_STEPS], 'b--')
148-
plt.ylim((-1.2, 1.2))
149-
plt.draw()
150-
plt.pause(0.3)
147+
# plt.plot(xs[0, :], res[0].flatten(), 'r', xs[0, :], pred.flatten()[:TIME_STEPS], 'b--')
148+
# plt.ylim((-1.2, 1.2))
149+
# plt.draw()
150+
# plt.pause(0.3)
151151

152152
if i % 20 == 0:
153153
print('cost: ', round(cost, 4))
Binary file not shown.

0 commit comments

Comments
 (0)