def _compare_two_tensor_shapes(t1, t2):
  """Compare tensor shapes."""
  if t1.shape.as_list() != t2.shape.as_list():
    raise RuntimeError("Compare shape fail: base {} {} vs gc {} {}".format(t1.name, t1.shape.as_list(), t2.name, t2.shape.as_list()))
  return True