raise ValueError("FixedLenFeature %r got default value for rank > 0, "
"only scalar default values are supported"
% (self._name,))
if isinstance(self._default_value, list):
raise ValueError("FixedLenFeature %r got non-scalar default value, "
"only scalar default values are supported" %
(self._name,))
After Change
self._size *= dim
default_value = feature_spec.default_value
if default_value is not None:
np_default_value = np.asarray(default_value)
if list(np_default_value.shape) != self._shape:
raise ValueError(
"FixedLenFeature %r got default value with incorrect shape" %
(self._name,))