aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/saver.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/training/saver.py')
-rw-r--r--tensorflow/python/training/saver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/training/saver.py b/tensorflow/python/training/saver.py
index 8694dd694f..3648e5a040 100644
--- a/tensorflow/python/training/saver.py
+++ b/tensorflow/python/training/saver.py
@@ -404,8 +404,8 @@ class BaseSaverBuilder(object):
if slice_name is None:
slice_name = variable._save_slice_info.full_name
elif slice_name != variable._save_slice_info.full_name:
- raise variable("Slices must all be from the same tensor: %s != %s"
- % (slice_name, variable._save_slice_info.full_name))
+ raise ValueError("Slices must all be from the same tensor: %s != %s"
+ % (slice_name, variable._save_slice_info.full_name))
self._AddVarToSave(vars_to_save, seen_variables,
variable, variable._save_slice_info.spec, name)
# pylint: enable=protected-access