diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-27 15:49:53 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-27 15:55:14 -0700 |
commit | b56164c72b8f123bfc675f930111af8801fe034f (patch) | |
tree | 914730f7a5c6a51b488cf438b17b6487f6cdc250 /tensorflow/contrib/layers | |
parent | bfec3d54fed955a4b145220e64c48b94fbb04ae7 (diff) |
Automated rollback of commit 425e96f3ae4eb338268e3738260f9d79e4bdd893. Revert #20539.
PiperOrigin-RevId: 214849875
Diffstat (limited to 'tensorflow/contrib/layers')
-rw-r--r-- | tensorflow/contrib/layers/python/layers/embedding_ops.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tensorflow/contrib/layers/python/layers/embedding_ops.py b/tensorflow/contrib/layers/python/layers/embedding_ops.py index 17ee8c0733..60e1d85ea9 100644 --- a/tensorflow/contrib/layers/python/layers/embedding_ops.py +++ b/tensorflow/contrib/layers/python/layers/embedding_ops.py @@ -112,11 +112,9 @@ def safe_embedding_lookup_sparse(embedding_weights, dtype = sparse_weights.dtype if sparse_weights is not None else None if isinstance(embedding_weights, variables.PartitionedVariable): embedding_weights = list(embedding_weights) - if not isinstance(embedding_weights[0], - resource_variable_ops.ResourceVariable): - embedding_weights = [ - ops.convert_to_tensor(w, dtype=dtype) for w in embedding_weights - ] + embedding_weights = [ + ops.convert_to_tensor(w, dtype=dtype) for w in embedding_weights + ] contrib_tensor_util.assert_same_float_dtype(embedding_weights + [sparse_weights]) |