aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/estimator
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-10-02 15:07:36 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-02 15:16:29 -0700
commitcfec3aa38db1d2b70045e7b89d82fae87c3fec02 (patch)
treeb9ffc25f9bdb0353bfaed71f7ae24178eb8cd4d1 /tensorflow/contrib/estimator
parent08e5ad2839ca2c6749544ace354f78d00f5243d9 (diff)
Update code to use convert_to_tensor_or_indexed_slices, since features may be SparseTensors as well.
PiperOrigin-RevId: 215466199
Diffstat (limited to 'tensorflow/contrib/estimator')
-rw-r--r--tensorflow/contrib/estimator/python/estimator/dnn_with_layer_annotations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/estimator/python/estimator/dnn_with_layer_annotations.py b/tensorflow/contrib/estimator/python/estimator/dnn_with_layer_annotations.py
index 5faf0aacfe..6ca7aaf989 100644
--- a/tensorflow/contrib/estimator/python/estimator/dnn_with_layer_annotations.py
+++ b/tensorflow/contrib/estimator/python/estimator/dnn_with_layer_annotations.py
@@ -151,7 +151,7 @@ def make_input_layer_with_layer_annotations(original_input_layer):
# spec and looking at the keys.
spec = feature_column_lib.make_parse_example_spec(feature_columns)
for key in spec.keys():
- tensor = ops.convert_to_tensor(features[key])
+ tensor = ops.convert_to_tensor_or_indexed_slices(features[key])
ops.add_to_collection(
LayerAnnotationsCollectionNames.keys(
LayerAnnotationsCollectionNames.UNPROCESSED_FEATURES), key)