Closed jqzhao7 closed 3 years ago
TypeError: "Operation" object does not support indexing
using TensorFlow==2.1.0 can solve
I'm a little bit unsure what to do about this issue - when does this happen? What TensorFlow version were you using that caused the error?
Closing for lack of details on the reported issue.
Having the same issue with conda env built from environment.yml (tensorflow 2.0.0):
projects/tf2-gnn/tf2_gnn/models/graph_task_model.py:363 _fast_run_step *
tf.cond(training, true_fn=_training_update, false_fn=_no_op)
anaconda3/envs/tf2-gnn-env/lib/python3.7/site-packages/tensorflow_core/python/ops/control_flow_ops.py:1389 cond_for_tf_v2
return cond(pred, true_fn=true_fn, false_fn=false_fn, strict=True, name=name)
anaconda3/envs/tf2-gnn-env/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py:507 new_func
return func(*args, **kwargs)
anaconda3/envs/tf2-gnn-env/lib/python3.7/site-packages/tensorflow_core/python/ops/control_flow_ops.py:1174 cond
return cond_v2.cond_v2(pred, true_fn, false_fn, name)
anaconda3/envs/tf2-gnn-env/lib/python3.7/site-packages/tensorflow_core/python/ops/cond_v2.py:101 cond_v2
name=scope)
anaconda3/envs/tf2-gnn-env/lib/python3.7/site-packages/tensorflow_core/python/ops/cond_v2.py:278 _build_cond
if_op = tensors[0].op
TypeError: 'Operation' object does not support indexing
TypeError: "Operation" object does not support indexing