Skip to content

Commit

Permalink
fix "if grad:" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
geffy committed Apr 17, 2016
1 parent 6fcb726 commit 23ba93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf_rl/controller/discrete_deepq.py
Expand Up @@ -146,7 +146,7 @@ def create_variables(self):
# Add histograms for gradients.
for grad, var in gradients:
tf.histogram_summary(var.name, var)
if grad:
if grad is not None:
tf.histogram_summary(var.name + '/gradients', grad)
self.train_op = self.optimizer.apply_gradients(gradients)

Expand Down

0 comments on commit 23ba93b

Please sign in to comment.