diff options
author | Karmel Allison <karmel@google.com> | 2018-10-08 10:36:38 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-08 10:45:20 -0700 |
commit | 153decedefc8da1fbd0717f4223b4b053e7aa517 (patch) | |
tree | e192213841f3266ef4c360e357e0e2918f757ed0 /tensorflow/python/ops | |
parent | 049d98c84ca7474459175914ca49c1fa3c11581d (diff) |
Add support for SequenceExamples to sequence_feature_columns
PiperOrigin-RevId: 216210141
Diffstat (limited to 'tensorflow/python/ops')
-rw-r--r-- | tensorflow/python/ops/parsing_ops.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tensorflow/python/ops/parsing_ops.py b/tensorflow/python/ops/parsing_ops.py index ff50fe0d09..a2da6412ed 100644 --- a/tensorflow/python/ops/parsing_ops.py +++ b/tensorflow/python/ops/parsing_ops.py @@ -217,21 +217,21 @@ def _features_to_raw_params(features, types): feature = features[key] if isinstance(feature, VarLenFeature): if VarLenFeature not in types: - raise ValueError("Unsupported VarLenFeature %s." % feature) + raise ValueError("Unsupported VarLenFeature %s." % (feature,)) if not feature.dtype: raise ValueError("Missing type for feature %s." % key) sparse_keys.append(key) sparse_types.append(feature.dtype) elif isinstance(feature, SparseFeature): if SparseFeature not in types: - raise ValueError("Unsupported SparseFeature %s." % feature) + raise ValueError("Unsupported SparseFeature %s." % (feature,)) if not feature.index_key: raise ValueError( - "Missing index_key for SparseFeature %s." % feature) + "Missing index_key for SparseFeature %s." % (feature,)) if not feature.value_key: raise ValueError( - "Missing value_key for SparseFeature %s." % feature) + "Missing value_key for SparseFeature %s." % (feature,)) if not feature.dtype: raise ValueError("Missing type for feature %s." % key) index_keys = feature.index_key @@ -260,7 +260,7 @@ def _features_to_raw_params(features, types): sparse_types.append(feature.dtype) elif isinstance(feature, FixedLenFeature): if FixedLenFeature not in types: - raise ValueError("Unsupported FixedLenFeature %s." % feature) + raise ValueError("Unsupported FixedLenFeature %s." % (feature,)) if not feature.dtype: raise ValueError("Missing type for feature %s." % key) if feature.shape is None: @@ -281,7 +281,8 @@ def _features_to_raw_params(features, types): dense_defaults[key] = feature.default_value elif isinstance(feature, FixedLenSequenceFeature): if FixedLenSequenceFeature not in types: - raise ValueError("Unsupported FixedLenSequenceFeature %s." % feature) + raise ValueError("Unsupported FixedLenSequenceFeature %s." % ( + feature,)) if not feature.dtype: raise ValueError("Missing type for feature %s." % key) if feature.shape is None: |