class tf.SparseFeatureSee the guide: Inputs and Readers > Converting
Configuration for parsing a sparse input feature.
index_key: Name of index feature. The underlying feature's type must be int64 and its length must always match that of the value_key feature.value_key: Name of value feature. The underlying feature's type must be dtype and its length must always match that of the index_key feature.dtype: Data type of the value_key feature.size: A Python int to specify a dimension of the dense shape. Each value in the index_key feature must be in [0, size).already_sorted: A Python boolean to specify whether the values in index_key are already sorted. If so skip sorting. False by default (optional).already_sortedAlias for field number 4
dtypeAlias for field number 2
index_keyAlias for field number 0
sizeAlias for field number 3
value_keyAlias for field number 1
__init__countindexDefined in tensorflow/python/ops/parsing_ops.py.
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/SparseFeature