Skip to content

Commit 0bc0566

Browse files
Import gradient definitions in embedding_ops, instead of having to import them in client code.
PiperOrigin-RevId: 156097017
1 parent b30762d commit 0bc0566

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

tensorflow/python/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,7 @@ py_library(
13321332
deps = [
13331333
":array_ops",
13341334
":clip_ops",
1335+
":data_flow_grad",
13351336
":data_flow_ops",
13361337
":framework",
13371338
":framework_for_generated_wrappers",

tensorflow/python/kernel_tests/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,6 @@ cuda_py_test(
23792379
"//third_party/py/numpy",
23802380
"//tensorflow/python:array_ops",
23812381
"//tensorflow/python:client_testlib",
2382-
"//tensorflow/python:data_flow_grad",
23832382
"//tensorflow/python:data_flow_ops",
23842383
"//tensorflow/python:embedding_ops",
23852384
"//tensorflow/python:framework",

tensorflow/python/kernel_tests/embedding_ops_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
from tensorflow.python.ops import state_ops
3737
from tensorflow.python.ops import variable_scope
3838
from tensorflow.python.ops import variables
39-
import tensorflow.python.ops.data_flow_grad # pylint: disable=unused-import
4039
from tensorflow.python.platform import test
4140
from tensorflow.python.platform import tf_logging
4241
from tensorflow.python.util import compat

tensorflow/python/ops/embedding_ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from tensorflow.python.framework import sparse_tensor
2727
from tensorflow.python.ops import array_ops
2828
from tensorflow.python.ops import clip_ops
29+
# Imports gradient definitions.
30+
from tensorflow.python.ops import data_flow_grad # pylint: disable=unused-import
2931
from tensorflow.python.ops import data_flow_ops
3032
from tensorflow.python.ops import math_ops
3133
from tensorflow.python.ops import resource_variable_ops

0 commit comments

Comments
 (0)