Skip to content

Commit 014ff10

Browse files
author
Vijay Vasudevan
committed
TensorFlow: fix some last python3 compatibility issues for 0.6.0.
Change-Id: I3cd6c6e3f3c7755343213e4697c97a09f79fb947
1 parent 3951b24 commit 014ff10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tensorflow/models/image/imagenet/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ py_binary(
1010
srcs = [
1111
"classify_image.py",
1212
],
13+
srcs_version = "PY2AND3",
1314
visibility = ["//tensorflow:__subpackages__"],
1415
deps = [
1516
"//tensorflow:tensorflow_py",

tensorflow/python/ops/gradients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def gradients(ys,
444444
op_wrapper = control_flow_ops.MakeWrapper(op)
445445
in_grads = _AsList(grad_fn(op_wrapper, *out_grads))
446446
_VerifyGeneratedGradients(in_grads, op)
447-
if gate_gradients and len(filter(None, in_grads)) > 1:
447+
if gate_gradients and len(tuple(filter(None, in_grads))) > 1:
448448
in_grads = control_flow_ops.tuple(in_grads)
449449
logging.vlog(1, "Gradient for '" + op.name + "'")
450450
logging.vlog(1, " in --> %s",

0 commit comments

Comments
 (0)