Skip to content

Commit

Permalink
Update deep_q_network.py for Tensorflow 1.0
Browse files Browse the repository at this point in the history
"tf.mul, tf.sub and tf.neg are deprecated in favor of tf.multiply, tf.subtract and tf.negative." - see https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md for changes related to "Release 1.0.0".
  • Loading branch information
jgyllinsky authored Feb 28, 2017
1 parent eb35b8f commit a0f05a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deep_q_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def trainNetwork(s, readout, h_fc1, sess):
# define the cost function
a = tf.placeholder("float", [None, ACTIONS])
y = tf.placeholder("float", [None])
readout_action = tf.reduce_sum(tf.mul(readout, a), reduction_indices=1)
readout_action = tf.reduce_sum(tf.multiply(readout, a), reduction_indices=1)
cost = tf.reduce_mean(tf.square(y - readout_action))
train_step = tf.train.AdamOptimizer(1e-6).minimize(cost)

Expand Down

0 comments on commit a0f05a9

Please sign in to comment.