W3cubDocs

/TensorFlow Python

tf.SparseFeature

class tf.SparseFeature

See the guide: Inputs and Readers > Converting

Configuration for parsing a sparse input feature.

Fields:

  • 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).

Properties

already_sorted

Alias for field number 4

dtype

Alias for field number 2

index_key

Alias for field number 0

size

Alias for field number 3

value_key

Alias for field number 1

Class Members

__init__

count

index

Defined 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