message: Fix bug that causes NotImplementedError when using tf.gather_nd on variables that are not ResourceVariable.
diff: @@ -3698,11 +3698,8 @@ def gather_nd(params, indices, name=None, batch_dims=0):
  if batch_dims_ is not None:
  batch_dims = int(batch_dims_)
  if batch_dims == 0:
  - try:
  - # TODO(apassos) find a less bad way of detecting resource variables
  - # without introducing a circular dependency.
  - return params.gather_nd(indices, name=name)
  - except AttributeError:
  + # TODO(lespeholt): Use ResourceVariable.gather_nd when params is a
  + # ResourceVariable (faster and more memory efficient.)
  return gen_array_ops.gather_nd(params, indices, name=name)
  else:
  return batch_gather_nd(
  