Skip to content

Commit bd02459

Browse files
committed
edit
1 parent 05b50f6 commit bd02459

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

Reinforcement_learning_TUT/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Reinforcement Methods and Tutorials
2+
3+
All methods mentioned below have their video and text tutorial in Chinese. Visit [莫烦 Python](https://morvanzhou.github.io/tutorials/) for more.
4+
5+
6+
* [Simple entry example](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/1_command_line_reinforcement_learning)
7+
* Tabular Methods
8+
* [Q-learning](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/2_Q_Learning_maze)
9+
* [Sarsa](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/3_Sarsa_maze)
10+
* [Sarsa(lambda)](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/4_Sarsa_lambda_maze)
11+
* Function Approximation (DQN)
12+
* [Deep Q Network](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/5_Deep_Q_Network)
13+
* [Using OpenAI Gym](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/6_OpenAI_gym)
14+
* DQN-based methods
15+
* [Double DQN](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/5.1_Double_DQN)
16+
* [DQN with Prioitized Experience Replay](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/5.2_Prioritized_Replay_DQN)
17+
* [Dueling DQN](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/5.3_Dueling_DQN)
18+
* [Policy Gradients](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/7_Policy_gradient_softmax)
19+
* [Actor Critic](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/8_Actor_Critic_Advantage)
20+
* [Deep Deterministic Policy Gradient](https://github.com/MorvanZhou/tutorials/tree/master/Reinforcement_learning_TUT/9_Deep_Deterministic_Policy_Gradient_DDPG)

tensorflowTUT/tf17_dropout/full_code.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def add_layer(inputs, in_size, out_size, layer_name, activation_function=None, )
3131
outputs = Wx_plus_b
3232
else:
3333
outputs = activation_function(Wx_plus_b, )
34-
tf.histogram_summary(layer_name + '/outputs', outputs)
34+
tf.summary.histogram(layer_name + '/outputs', outputs)
3535
return outputs
3636

3737

@@ -47,14 +47,14 @@ def add_layer(inputs, in_size, out_size, layer_name, activation_function=None, )
4747
# the loss between prediction and real data
4848
cross_entropy = tf.reduce_mean(-tf.reduce_sum(ys * tf.log(prediction),
4949
reduction_indices=[1])) # loss
50-
tf.scalar_summary('loss', cross_entropy)
50+
tf.summary.scalar('loss', cross_entropy)
5151
train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy)
5252

5353
sess = tf.Session()
54-
merged = tf.merge_all_summaries()
54+
merged = tf.summary.merge_all()
5555
# summary writer goes in here
56-
train_writer = tf.train.SummaryWriter("logs/train", sess.graph)
57-
test_writer = tf.train.SummaryWriter("logs/test", sess.graph)
56+
train_writer = tf.summary.FileWriter("logs/train", sess.graph)
57+
test_writer = tf.summary.FileWriter("logs/test", sess.graph)
5858

5959
# tf.initialize_all_variables() no long valid from
6060
# 2017-03-02 if using tensorflow >= 0.12

0 commit comments

Comments
 (0)