message: Improve err msg given by TensorArrayGrad to highlight the fact that the cause is a dependent tf.gradients op has a custom name that starts with something other than "gradients".
diff: @@ -72,7 +72,11 @@ def _GetGradSource(op_or_tensor):
  if not grad_pos:
  raise ValueError(
  "Expected op/tensor name to start with gradients (excluding scope)"
  - ", got: %s" % op_or_tensor.name)
  + ", got: {}. This means that a tf.gradients op with this op in its "
  + "dependency path has a custom name that does not start with "
  + "'gradients'. Please make sure all calls to tf.gradients that have "
  + "non-empty 'name' arguments use names that start with "
  + "'gradients'.".format(op_or_tensor.name))
  return "/".join(name_tokens[:grad_pos[-1] + 1])
  