aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/dist_test
diff options
context:
space:
mode:
authorGravatar Eugene Brevdo <ebrevdo@google.com>2016-12-08 15:17:34 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-08 15:25:27 -0800
commitb79d37b19bc692635d52b5273a9b922a5c24c225 (patch)
treef7786eb23e664852152e601fed7e157931f10549 /tensorflow/tools/dist_test
parent01afde4906b7483aa291cd6a7510d502e8d3beae (diff)
Final breaking change of SparseTensor.shape -> SparseTensor.dense_shape rename.
Removing shape property from SparseTensor. Change: 141490813
Diffstat (limited to 'tensorflow/tools/dist_test')
-rw-r--r--tensorflow/tools/dist_test/python/census_widendeep.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tensorflow/tools/dist_test/python/census_widendeep.py b/tensorflow/tools/dist_test/python/census_widendeep.py
index 309366e467..62ff7f8f2f 100644
--- a/tensorflow/tools/dist_test/python/census_widendeep.py
+++ b/tensorflow/tools/dist_test/python/census_widendeep.py
@@ -217,11 +217,12 @@ class CensusDataSource(object):
for k in self.continuous_columns}
# Creates a dictionary mapping from each categorical feature column name (k)
# to the values of that column stored in a tf.SparseTensor.
- categorical_cols = {k: tf.SparseTensor(
- indices=[[i, 0] for i in range(df[k].size)],
- values=df[k].values,
- shape=[df[k].size, 1])
- for k in self.categorical_columns}
+ categorical_cols = {
+ k: tf.SparseTensor(
+ indices=[[i, 0] for i in range(df[k].size)],
+ values=df[k].values,
+ dense_shape=[df[k].size, 1])
+ for k in self.categorical_columns}
# Merges the two dictionaries into one.
feature_cols = dict(continuous_cols.items() + categorical_cols.items())
# Converts the label column into a constant Tensor.