1 # Description: 2 # Contains typical networks definitions. 3 4 licenses(["notice"]) # Apache 2.0 5 6 exports_files(["LICENSE"]) 7 8 load("//tensorflow:tensorflow.bzl", "py_test") 9 10 package( 11 default_visibility = [ 12 "//tensorflow:__subpackages__", 13 "//tensorflow_models:__subpackages__", 14 ], 15 ) 16 17 # Transitive dependencies of this target will be included in the pip package. 18 py_library( 19 name = "nets_pip", 20 deps = [ 21 ":alexnet", 22 ":inception", 23 ":overfeat", 24 ":resnet_v1", 25 ":resnet_v2", 26 ":vgg", 27 ], 28 ) 29 30 py_library( 31 name = "alexnet", 32 srcs = ["alexnet.py"], 33 srcs_version = "PY2AND3", 34 deps = [ 35 "//tensorflow/contrib/framework:framework_py", 36 "//tensorflow/contrib/layers:layers_py", 37 "//tensorflow/python:array_ops", 38 "//tensorflow/python:init_ops", 39 "//tensorflow/python:nn_ops", 40 "//tensorflow/python:variable_scope", 41 ], 42 ) 43 44 py_test( 45 name = "alexnet_test", 46 size = "medium", 47 srcs = ["alexnet_test.py"], 48 srcs_version = "PY2AND3", 49 deps = [ 50 ":alexnet", 51 "//tensorflow/contrib/framework:framework_py", 52 "//tensorflow/python:client_testlib", 53 "//tensorflow/python:math_ops", 54 "//tensorflow/python:random_ops", 55 "//tensorflow/python:variable_scope", 56 "//tensorflow/python:variables", 57 ], 58 ) 59 60 py_library( 61 name = "inception", 62 srcs = ["inception.py"], 63 srcs_version = "PY2AND3", 64 deps = [ 65 ":inception_v1", 66 ":inception_v2", 67 ":inception_v3", 68 ], 69 ) 70 71 py_library( 72 name = "inception_v1", 73 srcs = ["inception_v1.py"], 74 srcs_version = "PY2AND3", 75 deps = [ 76 "//tensorflow/contrib/framework:framework_py", 77 "//tensorflow/contrib/layers:layers_py", 78 "//tensorflow/python:array_ops", 79 "//tensorflow/python:framework_for_generated_wrappers", 80 "//tensorflow/python:init_ops", 81 "//tensorflow/python:nn_ops", 82 "//tensorflow/python:variable_scope", 83 ], 84 ) 85 86 py_library( 87 name = "inception_v2", 88 srcs = ["inception_v2.py"], 89 srcs_version = "PY2AND3", 90 deps = [ 91 "//tensorflow/contrib/framework:framework_py", 92 "//tensorflow/contrib/layers:layers_py", 93 "//tensorflow/python:array_ops", 94 "//tensorflow/python:framework_for_generated_wrappers", 95 "//tensorflow/python:init_ops", 96 "//tensorflow/python:nn_ops", 97 "//tensorflow/python:variable_scope", 98 ], 99 ) 100 101 py_library( 102 name = "inception_v3", 103 srcs = ["inception_v3.py"], 104 srcs_version = "PY2AND3", 105 deps = [ 106 "//tensorflow/contrib/framework:framework_py", 107 "//tensorflow/contrib/layers:layers_py", 108 "//tensorflow/python:array_ops", 109 "//tensorflow/python:framework_for_generated_wrappers", 110 "//tensorflow/python:init_ops", 111 "//tensorflow/python:nn_ops", 112 "//tensorflow/python:variable_scope", 113 ], 114 ) 115 116 py_test( 117 name = "inception_v1_test", 118 size = "large", 119 srcs = ["inception_v1_test.py"], 120 shard_count = 3, 121 srcs_version = "PY2AND3", 122 deps = [ 123 ":inception_v1", 124 "//tensorflow/contrib/framework:framework_py", 125 "//tensorflow/contrib/slim:model_analyzer", 126 "//tensorflow/python:array_ops", 127 "//tensorflow/python:client_testlib", 128 "//tensorflow/python:framework_for_generated_wrappers", 129 "//tensorflow/python:math_ops", 130 "//tensorflow/python:random_ops", 131 "//tensorflow/python:variables", 132 "//third_party/py/numpy", 133 ], 134 ) 135 136 py_test( 137 name = "inception_v2_test", 138 size = "large", 139 srcs = ["inception_v2_test.py"], 140 shard_count = 3, 141 srcs_version = "PY2AND3", 142 deps = [ 143 ":inception_v2", 144 "//tensorflow/contrib/framework:framework_py", 145 "//tensorflow/contrib/slim:model_analyzer", 146 "//tensorflow/python:array_ops", 147 "//tensorflow/python:client_testlib", 148 "//tensorflow/python:framework_for_generated_wrappers", 149 "//tensorflow/python:math_ops", 150 "//tensorflow/python:random_ops", 151 "//tensorflow/python:variables", 152 "//third_party/py/numpy", 153 ], 154 ) 155 156 py_test( 157 name = "inception_v3_test", 158 size = "large", 159 srcs = ["inception_v3_test.py"], 160 shard_count = 3, 161 srcs_version = "PY2AND3", 162 deps = [ 163 ":inception_v3", 164 "//tensorflow/contrib/framework:framework_py", 165 "//tensorflow/contrib/slim:model_analyzer", 166 "//tensorflow/python:array_ops", 167 "//tensorflow/python:client_testlib", 168 "//tensorflow/python:framework_for_generated_wrappers", 169 "//tensorflow/python:math_ops", 170 "//tensorflow/python:random_ops", 171 "//tensorflow/python:variables", 172 "//third_party/py/numpy", 173 ], 174 ) 175 176 py_library( 177 name = "overfeat", 178 srcs = ["overfeat.py"], 179 srcs_version = "PY2AND3", 180 deps = [ 181 "//tensorflow/contrib/framework:framework_py", 182 "//tensorflow/contrib/layers:layers_py", 183 "//tensorflow/python:array_ops", 184 "//tensorflow/python:init_ops", 185 "//tensorflow/python:nn_ops", 186 "//tensorflow/python:variable_scope", 187 ], 188 ) 189 190 py_test( 191 name = "overfeat_test", 192 size = "medium", 193 srcs = ["overfeat_test.py"], 194 srcs_version = "PY2AND3", 195 deps = [ 196 ":overfeat", 197 "//tensorflow/contrib/framework:framework_py", 198 "//tensorflow/python:client_testlib", 199 "//tensorflow/python:math_ops", 200 "//tensorflow/python:random_ops", 201 "//tensorflow/python:variable_scope", 202 "//tensorflow/python:variables", 203 ], 204 ) 205 206 py_library( 207 name = "resnet_utils", 208 srcs = ["resnet_utils.py"], 209 srcs_version = "PY2AND3", 210 deps = [ 211 "//tensorflow/contrib/framework:framework_py", 212 "//tensorflow/contrib/layers:layers_py", 213 "//tensorflow/python:array_ops", 214 "//tensorflow/python:framework_for_generated_wrappers", 215 "//tensorflow/python:nn_ops", 216 "//tensorflow/python:variable_scope", 217 ], 218 ) 219 220 py_library( 221 name = "resnet_v1", 222 srcs = ["resnet_v1.py"], 223 srcs_version = "PY2AND3", 224 deps = [ 225 ":resnet_utils", 226 "//tensorflow/contrib/framework:framework_py", 227 "//tensorflow/contrib/layers:layers_py", 228 "//tensorflow/python:math_ops", 229 "//tensorflow/python:nn_ops", 230 "//tensorflow/python:variable_scope", 231 ], 232 ) 233 234 py_test( 235 name = "resnet_v1_test", 236 size = "large", 237 srcs = ["resnet_v1_test.py"], 238 srcs_version = "PY2AND3", 239 deps = [ 240 ":resnet_utils", 241 ":resnet_v1", 242 "//tensorflow/contrib/framework:framework_py", 243 "//tensorflow/contrib/layers:layers_py", 244 "//tensorflow/python:array_ops", 245 "//tensorflow/python:client_testlib", 246 "//tensorflow/python:framework_for_generated_wrappers", 247 "//tensorflow/python:math_ops", 248 "//tensorflow/python:random_seed", 249 "//tensorflow/python:variable_scope", 250 "//tensorflow/python:variables", 251 "//third_party/py/numpy", 252 ], 253 ) 254 255 py_library( 256 name = "resnet_v2", 257 srcs = ["resnet_v2.py"], 258 srcs_version = "PY2AND3", 259 deps = [ 260 ":resnet_utils", 261 "//tensorflow/contrib/framework:framework_py", 262 "//tensorflow/contrib/layers:layers_py", 263 "//tensorflow/python:math_ops", 264 "//tensorflow/python:nn_ops", 265 "//tensorflow/python:variable_scope", 266 ], 267 ) 268 269 py_test( 270 name = "resnet_v2_test", 271 size = "large", 272 srcs = ["resnet_v2_test.py"], 273 srcs_version = "PY2AND3", 274 deps = [ 275 ":resnet_utils", 276 ":resnet_v2", 277 "//tensorflow/contrib/framework:framework_py", 278 "//tensorflow/contrib/layers:layers_py", 279 "//tensorflow/python:array_ops", 280 "//tensorflow/python:client_testlib", 281 "//tensorflow/python:framework_for_generated_wrappers", 282 "//tensorflow/python:math_ops", 283 "//tensorflow/python:random_seed", 284 "//tensorflow/python:variable_scope", 285 "//tensorflow/python:variables", 286 "//third_party/py/numpy", 287 ], 288 ) 289 290 py_library( 291 name = "vgg", 292 srcs = ["vgg.py"], 293 srcs_version = "PY2AND3", 294 deps = [ 295 "//tensorflow/contrib/framework:framework_py", 296 "//tensorflow/contrib/layers:layers_py", 297 "//tensorflow/python:array_ops", 298 "//tensorflow/python:init_ops", 299 "//tensorflow/python:nn_ops", 300 "//tensorflow/python:variable_scope", 301 ], 302 ) 303 304 py_test( 305 name = "vgg_test", 306 size = "medium", 307 srcs = ["vgg_test.py"], 308 srcs_version = "PY2AND3", 309 deps = [ 310 ":vgg", 311 "//tensorflow/contrib/framework:framework_py", 312 "//tensorflow/python:client_testlib", 313 "//tensorflow/python:framework_for_generated_wrappers", 314 "//tensorflow/python:math_ops", 315 "//tensorflow/python:random_ops", 316 "//tensorflow/python:variable_scope", 317 "//tensorflow/python:variables", 318 ], 319 ) 320 321 filegroup( 322 name = "all_files", 323 srcs = glob( 324 ["**/*"], 325 exclude = [ 326 "**/METADATA", 327 "**/OWNERS", 328 ], 329 ), 330 visibility = ["//tensorflow:__subpackages__"], 331 ) 332