Fix the ordering of attributes for indexlookup

PiperOrigin-RevId: 294818441
Change-Id: I30e08ce32f9aedf1890b99b5e880e6aaa9cc9b8d
This commit is contained in:
Zhenyu Tan 2020-02-12 19:49:22 -08:00 committed by TensorFlower Gardener
parent 4d5741f1d4
commit 7fa9732b8d

View File

@ -62,11 +62,11 @@ class IndexLookup(base_preprocessing_layer.CombinerPreprocessingLayer):
there is no cap on the size of the vocabulary. Note that the vocabulary there is no cap on the size of the vocabulary. Note that the vocabulary
does include OOV buckets, so the effective number of unique values in the does include OOV buckets, so the effective number of unique values in the
vocabulary is `(max_tokens - num_oov_tokens)` when this value is set. vocabulary is `(max_tokens - num_oov_tokens)` when this value is set.
vocabulary: An optional list of vocabulary terms.
num_oov_tokens: The number of out-of-vocabulary tokens to use; defaults to num_oov_tokens: The number of out-of-vocabulary tokens to use; defaults to
1. If this value is more than 1, OOV inputs are hashed to determine their 1. If this value is more than 1, OOV inputs are hashed to determine their
OOV value; if this value is 0, passing an OOV input will result in a OOV value; if this value is 0, passing an OOV input will result in a
runtime error. runtime error.
vocabulary: An optional list of vocabulary terms.
reserve_zero: Whether to reserve the index 0, which indicates pad values in reserve_zero: Whether to reserve the index 0, which indicates pad values in
the Keras masking system. If True, the output of this layer will be in the the Keras masking system. If True, the output of this layer will be in the
range `[1...max_tokens+1)`; if False, the output will be in the range range `[1...max_tokens+1)`; if False, the output will be in the range