提交 014ff10c 编写于 作者: V Vijay Vasudevan

TensorFlow: fix some last python3 compatibility issues for 0.6.0.

Change-Id: I3cd6c6e3f3c7755343213e4697c97a09f79fb947
上级 3951b248
......@@ -10,6 +10,7 @@ py_binary(
srcs = [
"classify_image.py",
],
srcs_version = "PY2AND3",
visibility = ["//tensorflow:__subpackages__"],
deps = [
"//tensorflow:tensorflow_py",
......
......@@ -444,7 +444,7 @@ def gradients(ys,
op_wrapper = control_flow_ops.MakeWrapper(op)
in_grads = _AsList(grad_fn(op_wrapper, *out_grads))
_VerifyGeneratedGradients(in_grads, op)
if gate_gradients and len(filter(None, in_grads)) > 1:
if gate_gradients and len(tuple(filter(None, in_grads))) > 1:
in_grads = control_flow_ops.tuple(in_grads)
logging.vlog(1, "Gradient for '" + op.name + "'")
logging.vlog(1, " in --> %s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册