The error should print the name of the variable.

Change: 113179600
This commit is contained in:
A. Unique TensorFlower 2016-01-27 11:03:31 -08:00 committed by Vijay Vasudevan
parent 89ecc05945
commit ac9b4d39a3

View File

@ -207,9 +207,9 @@ class ExponentialMovingAverage(object):
var_list = variables.trainable_variables()
for var in var_list:
if var.dtype.base_dtype not in [dtypes.float32, dtypes.float64]:
raise TypeError("The variables must be float or double: %s" % var)
raise TypeError("The variables must be float or double: %s" % var.name)
if var in self._averages:
raise ValueError("Moving average already computed for: %s" % var)
raise ValueError("Moving average already computed for: %s" % var.name)
# For variables: to lower communication bandwidth across devices we keep
# the moving averages on the same device as the variables. For other