Skip to content

Commit 0f1894d

Browse files
tanzhenyutensorflower-gardener
authored andcommitted
Move BUILD file to optimizer_v2 subfolder.
PiperOrigin-RevId: 217430948
1 parent dc7ca1c commit 0f1894d

3 files changed

Lines changed: 166 additions & 156 deletions

File tree

tensorflow/contrib/optimizer_v2/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ py_library(
4848
srcs_version = "PY2AND3",
4949
deps = [
5050
"//tensorflow/python:util",
51-
"//tensorflow/python/keras:optimizer_v2",
51+
"//tensorflow/python/keras/optimizer_v2",
5252
],
5353
)
5454

tensorflow/python/keras/BUILD

Lines changed: 1 addition & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ py_library(
6262
":backend",
6363
":engine",
6464
":layers",
65-
":optimizer_v2",
65+
"//tensorflow/python/keras/optimizer_v2:optimizer_v2",
6666
"//tensorflow/python/saved_model",
6767
"//tensorflow/python:training",
6868
],
@@ -190,30 +190,6 @@ py_library(
190190
],
191191
)
192192

193-
py_library(
194-
name = "optimizer_v2",
195-
srcs = [
196-
"optimizer_v2/adadelta.py",
197-
"optimizer_v2/adagrad.py",
198-
"optimizer_v2/adam.py",
199-
"optimizer_v2/optimizer_v2.py",
200-
"optimizer_v2/rmsprop.py",
201-
"optimizer_v2/sgd.py",
202-
],
203-
srcs_version = "PY2AND3",
204-
deps = [
205-
"//tensorflow/python:control_flow_ops",
206-
"//tensorflow/python:distribute",
207-
"//tensorflow/python:framework",
208-
"//tensorflow/python:math_ops",
209-
"//tensorflow/python:resource_variable_ops",
210-
"//tensorflow/python:state_ops",
211-
"//tensorflow/python:training",
212-
"//tensorflow/python:variable_scope",
213-
"//tensorflow/python:variables",
214-
],
215-
)
216-
217193
py_test(
218194
name = "integration_test",
219195
size = "medium",
@@ -865,133 +841,3 @@ py_library(
865841
"//third_party/py/numpy",
866842
],
867843
)
868-
869-
cuda_py_test(
870-
name = "adadelta_test",
871-
size = "medium",
872-
srcs = ["optimizer_v2/adadelta_test.py"],
873-
additional_deps = [
874-
":optimizer_v2",
875-
"//tensorflow/python:client_testlib",
876-
"//tensorflow/python:embedding_ops",
877-
"//tensorflow/python:framework",
878-
"//tensorflow/python:math_ops",
879-
"//tensorflow/python:platform",
880-
"//tensorflow/python:platform_test",
881-
"//tensorflow/python:resource_variable_ops",
882-
"//tensorflow/python:variables",
883-
"//third_party/py/numpy",
884-
],
885-
)
886-
887-
cuda_py_test(
888-
name = "adagrad_test",
889-
size = "small",
890-
srcs = ["optimizer_v2/adagrad_test.py"],
891-
additional_deps = [
892-
":optimizer_v2",
893-
"//tensorflow/python:embedding_ops",
894-
"//tensorflow/python:framework",
895-
"//tensorflow/python:math_ops",
896-
"//tensorflow/python:platform",
897-
"//tensorflow/python:platform_test",
898-
"//tensorflow/python:client_testlib",
899-
"//third_party/py/numpy",
900-
],
901-
)
902-
903-
cuda_py_test(
904-
name = "adam_test",
905-
size = "small",
906-
srcs = ["optimizer_v2/adam_test.py"],
907-
additional_deps = [
908-
":optimizer_v2",
909-
"//tensorflow/python:array_ops",
910-
"//tensorflow/python:framework",
911-
"//tensorflow/python:math_ops",
912-
"//tensorflow/python:platform",
913-
"//tensorflow/python:platform_test",
914-
"//tensorflow/python:client_testlib",
915-
"//third_party/py/numpy",
916-
],
917-
)
918-
919-
cuda_py_test(
920-
name = "checkpointable_utils_test",
921-
srcs = ["optimizer_v2/checkpointable_utils_test.py"],
922-
additional_deps = [
923-
":optimizer_v2",
924-
"@six_archive//:six",
925-
"//tensorflow/python:constant_op",
926-
"//tensorflow/python:dtypes",
927-
"//tensorflow/python:framework_ops",
928-
"//tensorflow/python:framework_test_lib",
929-
"//tensorflow/python:init_ops",
930-
"//tensorflow/python:layers",
931-
"//tensorflow/python:layers_base",
932-
"//tensorflow/python:resource_variable_ops",
933-
"//tensorflow/python:state_ops",
934-
"//tensorflow/python:training",
935-
"//tensorflow/python:variable_scope",
936-
"//tensorflow/python:variables",
937-
"//tensorflow/python/eager:context",
938-
"//tensorflow/python/eager:test",
939-
"//tensorflow/python/keras",
940-
],
941-
tags = ["notsan"],
942-
)
943-
944-
cuda_py_test(
945-
name = "sgd_test",
946-
size = "medium",
947-
srcs = ["optimizer_v2/sgd_test.py"],
948-
additional_deps = [
949-
":optimizer_v2",
950-
"//tensorflow/python:client_testlib",
951-
"//tensorflow/python:embedding_ops",
952-
"//tensorflow/python:platform_test",
953-
"//tensorflow/python:framework",
954-
"//tensorflow/python:math_ops",
955-
"//tensorflow/python:resource_variable_ops",
956-
"//tensorflow/python:resources",
957-
"//tensorflow/python:variables",
958-
"//tensorflow/python/eager:context",
959-
],
960-
)
961-
962-
cuda_py_test(
963-
name = "optimizer_v2_test",
964-
size = "medium",
965-
srcs = ["optimizer_v2/optimizer_v2_test.py"],
966-
additional_deps = [
967-
":optimizer_v2",
968-
"//tensorflow/python:client_testlib",
969-
"//tensorflow/python:framework",
970-
"//tensorflow/python:framework_test_lib",
971-
"//tensorflow/python:array_ops",
972-
"//tensorflow/python:clip_ops",
973-
"//tensorflow/python:gradients",
974-
"//tensorflow/python:resource_variable_ops",
975-
"//tensorflow/python:state_ops",
976-
"//tensorflow/python:variables",
977-
],
978-
)
979-
980-
cuda_py_test(
981-
name = "rmsprop_test",
982-
size = "small",
983-
srcs = ["optimizer_v2/rmsprop_test.py"],
984-
additional_deps = [
985-
":optimizer_v2",
986-
"@absl_py//absl/testing:parameterized",
987-
"//tensorflow/python:array_ops",
988-
"//tensorflow/python:embedding_ops",
989-
"//tensorflow/python:framework",
990-
"//tensorflow/python:math_ops",
991-
"//tensorflow/python:platform",
992-
"//tensorflow/python:platform_test",
993-
"//tensorflow/python:client_testlib",
994-
"//third_party/py/numpy",
995-
],
996-
tags = ["optonly"],
997-
)
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Description:
2+
# Contains the Keras OptimizerV2 API (internal TensorFlow version).
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
licenses(["notice"]) # Apache 2.0
7+
8+
exports_files(["LICENSE"])
9+
10+
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
11+
12+
py_library(
13+
name = "optimizer_v2",
14+
srcs = [
15+
"adadelta.py",
16+
"adagrad.py",
17+
"adam.py",
18+
"optimizer_v2.py",
19+
"rmsprop.py",
20+
"sgd.py",
21+
],
22+
srcs_version = "PY2AND3",
23+
deps = [
24+
"//tensorflow/python:control_flow_ops",
25+
"//tensorflow/python:distribute",
26+
"//tensorflow/python:framework",
27+
"//tensorflow/python:math_ops",
28+
"//tensorflow/python:resource_variable_ops",
29+
"//tensorflow/python:state_ops",
30+
"//tensorflow/python:training",
31+
"//tensorflow/python:variable_scope",
32+
"//tensorflow/python:variables",
33+
],
34+
)
35+
36+
cuda_py_test(
37+
name = "adadelta_test",
38+
size = "medium",
39+
srcs = ["adadelta_test.py"],
40+
additional_deps = [
41+
":optimizer_v2",
42+
"//tensorflow/python:client_testlib",
43+
"//tensorflow/python:embedding_ops",
44+
"//tensorflow/python:framework",
45+
"//tensorflow/python:math_ops",
46+
"//tensorflow/python:platform",
47+
"//tensorflow/python:platform_test",
48+
"//tensorflow/python:resource_variable_ops",
49+
"//tensorflow/python:variables",
50+
"//third_party/py/numpy",
51+
],
52+
)
53+
54+
cuda_py_test(
55+
name = "adagrad_test",
56+
size = "small",
57+
srcs = ["adagrad_test.py"],
58+
additional_deps = [
59+
":optimizer_v2",
60+
"//tensorflow/python:embedding_ops",
61+
"//tensorflow/python:framework",
62+
"//tensorflow/python:math_ops",
63+
"//tensorflow/python:platform",
64+
"//tensorflow/python:platform_test",
65+
"//tensorflow/python:client_testlib",
66+
"//third_party/py/numpy",
67+
],
68+
)
69+
70+
cuda_py_test(
71+
name = "adam_test",
72+
size = "small",
73+
srcs = ["adam_test.py"],
74+
additional_deps = [
75+
":optimizer_v2",
76+
"//tensorflow/python:array_ops",
77+
"//tensorflow/python:framework",
78+
"//tensorflow/python:math_ops",
79+
"//tensorflow/python:platform",
80+
"//tensorflow/python:platform_test",
81+
"//tensorflow/python:client_testlib",
82+
"//third_party/py/numpy",
83+
],
84+
)
85+
86+
cuda_py_test(
87+
name = "checkpointable_utils_test",
88+
srcs = ["checkpointable_utils_test.py"],
89+
additional_deps = [
90+
":optimizer_v2",
91+
"@six_archive//:six",
92+
"//tensorflow/python:constant_op",
93+
"//tensorflow/python:dtypes",
94+
"//tensorflow/python:framework_ops",
95+
"//tensorflow/python:framework_test_lib",
96+
"//tensorflow/python:init_ops",
97+
"//tensorflow/python:layers",
98+
"//tensorflow/python:layers_base",
99+
"//tensorflow/python:resource_variable_ops",
100+
"//tensorflow/python:state_ops",
101+
"//tensorflow/python:training",
102+
"//tensorflow/python:variable_scope",
103+
"//tensorflow/python:variables",
104+
"//tensorflow/python/eager:context",
105+
"//tensorflow/python/eager:test",
106+
"//tensorflow/python/keras",
107+
],
108+
tags = ["notsan"],
109+
)
110+
111+
cuda_py_test(
112+
name = "sgd_test",
113+
size = "medium",
114+
srcs = ["sgd_test.py"],
115+
additional_deps = [
116+
":optimizer_v2",
117+
"//tensorflow/python:client_testlib",
118+
"//tensorflow/python:embedding_ops",
119+
"//tensorflow/python:platform_test",
120+
"//tensorflow/python:framework",
121+
"//tensorflow/python:math_ops",
122+
"//tensorflow/python:resource_variable_ops",
123+
"//tensorflow/python:resources",
124+
"//tensorflow/python:variables",
125+
"//tensorflow/python/eager:context",
126+
],
127+
)
128+
129+
cuda_py_test(
130+
name = "optimizer_v2_test",
131+
size = "medium",
132+
srcs = ["optimizer_v2_test.py"],
133+
additional_deps = [
134+
":optimizer_v2",
135+
"//tensorflow/python:client_testlib",
136+
"//tensorflow/python:framework",
137+
"//tensorflow/python:framework_test_lib",
138+
"//tensorflow/python:array_ops",
139+
"//tensorflow/python:clip_ops",
140+
"//tensorflow/python:gradients",
141+
"//tensorflow/python:resource_variable_ops",
142+
"//tensorflow/python:state_ops",
143+
"//tensorflow/python:variables",
144+
],
145+
)
146+
147+
cuda_py_test(
148+
name = "rmsprop_test",
149+
size = "small",
150+
srcs = ["rmsprop_test.py"],
151+
additional_deps = [
152+
":optimizer_v2",
153+
"@absl_py//absl/testing:parameterized",
154+
"//tensorflow/python:array_ops",
155+
"//tensorflow/python:embedding_ops",
156+
"//tensorflow/python:framework",
157+
"//tensorflow/python:math_ops",
158+
"//tensorflow/python:platform",
159+
"//tensorflow/python:platform_test",
160+
"//tensorflow/python:client_testlib",
161+
"//third_party/py/numpy",
162+
],
163+
tags = ["optonly"],
164+
)

0 commit comments

Comments
 (0)