Commit 851f28a4 authored by argszero's avatar argszero
Browse files

Update inception_train.py

raise TypeError("Using a `tf.Tensor` as a Python `bool` is not allowed. "
TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed. Use `if t is not None:` instead of `if t:` to test if a tensor is defined, and use the logical TensorFlow ops to test the value of a tensor.
parent 1493624e
......@@ -266,7 +266,7 @@ def train(dataset):
# Add histograms for gradients.
for grad, var in grads:
if grad:
if grad is not None:
summaries.append(
tf.histogram_summary(var.op.name + '/gradients', grad))
......
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