diff options
author | 2018-03-09 20:50:32 -0800 | |
---|---|---|
committer | 2018-03-09 20:54:23 -0800 | |
commit | 40c96d70bd71d483324e7328958f61f723986dcb (patch) | |
tree | 1ec6d0409ee3ea4c85cbaac08cdefceef87c85aa | |
parent | a9bb191793e8e8c924b6a19f645610809b1dae62 (diff) |
Fix docstring for `embedding_lookup_sparse`.
Example with weighted mean combiner implies that single-key embeddings not normalized (the weighted sum answer). However, the code and test shows normalization regardless of number of keys.
PiperOrigin-RevId: 188575982
-rw-r--r-- | tensorflow/python/ops/embedding_ops.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/ops/embedding_ops.py b/tensorflow/python/ops/embedding_ops.py index 3826585f59..20e4a28b9c 100644 --- a/tensorflow/python/ops/embedding_ops.py +++ b/tensorflow/python/ops/embedding_ops.py @@ -396,8 +396,8 @@ def embedding_lookup_sparse(params, with `combiner`="mean", then the output will be a 3x20 matrix where output[0, :] = (params[1, :] * 2.0 + params[3, :] * 0.5) / (2.0 + 0.5) - output[1, :] = params[0, :] * 1.0 - output[2, :] = params[1, :] * 3.0 + output[1, :] = (params[0, :] * 1.0) / 1.0 + output[2, :] = (params[1, :] * 3.0) / 3.0 Raises: TypeError: If sp_ids is not a SparseTensor, or if sp_weights is neither |