BUILD 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. # Description:
  2. # Example TensorFlow models for ImageNet.
  3. package(default_visibility = [":internal"])
  4. licenses(["notice"]) # Apache 2.0
  5. exports_files(["LICENSE"])
  6. package_group(
  7. name = "internal",
  8. packages = ["//inception/..."],
  9. )
  10. py_library(
  11. name = "dataset",
  12. srcs = [
  13. "dataset.py",
  14. ],
  15. )
  16. py_library(
  17. name = "imagenet_data",
  18. srcs = [
  19. "imagenet_data.py",
  20. ],
  21. deps = [
  22. ":dataset",
  23. ],
  24. )
  25. py_library(
  26. name = "flowers_data",
  27. srcs = [
  28. "flowers_data.py",
  29. ],
  30. deps = [
  31. ":dataset",
  32. ],
  33. )
  34. py_library(
  35. name = "image_processing",
  36. srcs = [
  37. "image_processing.py",
  38. ],
  39. )
  40. py_library(
  41. name = "inception",
  42. srcs = [
  43. "inception_model.py",
  44. ],
  45. visibility = ["//visibility:public"],
  46. deps = [
  47. ":dataset",
  48. "//inception/slim",
  49. ],
  50. )
  51. py_binary(
  52. name = "imagenet_eval",
  53. srcs = [
  54. "imagenet_eval.py",
  55. ],
  56. deps = [
  57. ":imagenet_data",
  58. ":inception_eval",
  59. ],
  60. )
  61. py_binary(
  62. name = "flowers_eval",
  63. srcs = [
  64. "flowers_eval.py",
  65. ],
  66. deps = [
  67. ":flowers_data",
  68. ":inception_eval",
  69. ],
  70. )
  71. py_library(
  72. name = "inception_eval",
  73. srcs = [
  74. "inception_eval.py",
  75. ],
  76. deps = [
  77. ":image_processing",
  78. ":inception",
  79. ],
  80. )
  81. py_binary(
  82. name = "imagenet_train",
  83. srcs = [
  84. "imagenet_train.py",
  85. ],
  86. deps = [
  87. ":imagenet_data",
  88. ":inception_train",
  89. ],
  90. )
  91. py_binary(
  92. name = "imagenet_distributed_train",
  93. srcs = [
  94. "imagenet_distributed_train.py",
  95. ],
  96. deps = [
  97. ":imagenet_data",
  98. ":inception_distributed_train",
  99. ],
  100. )
  101. py_binary(
  102. name = "flowers_train",
  103. srcs = [
  104. "flowers_train.py",
  105. ],
  106. deps = [
  107. ":flowers_data",
  108. ":inception_train",
  109. ],
  110. )
  111. py_library(
  112. name = "inception_train",
  113. srcs = [
  114. "inception_train.py",
  115. ],
  116. deps = [
  117. ":image_processing",
  118. ":inception",
  119. ],
  120. )
  121. py_library(
  122. name = "inception_distributed_train",
  123. srcs = [
  124. "inception_distributed_train.py",
  125. ],
  126. deps = [
  127. ":image_processing",
  128. ":inception",
  129. ],
  130. )
  131. py_binary(
  132. name = "build_image_data",
  133. srcs = ["data/build_image_data.py"],
  134. )
  135. sh_binary(
  136. name = "download_and_preprocess_flowers",
  137. srcs = ["data/download_and_preprocess_flowers.sh"],
  138. data = [
  139. ":build_image_data",
  140. ],
  141. )
  142. sh_binary(
  143. name = "download_and_preprocess_imagenet",
  144. srcs = ["data/download_and_preprocess_imagenet.sh"],
  145. data = [
  146. "data/download_imagenet.sh",
  147. "data/imagenet_2012_validation_synset_labels.txt",
  148. "data/imagenet_lsvrc_2015_synsets.txt",
  149. "data/imagenet_metadata.txt",
  150. "data/preprocess_imagenet_validation_data.py",
  151. "data/process_bounding_boxes.py",
  152. ":build_imagenet_data",
  153. ],
  154. )
  155. py_binary(
  156. name = "build_imagenet_data",
  157. srcs = ["data/build_imagenet_data.py"],
  158. )
  159. filegroup(
  160. name = "srcs",
  161. srcs = glob(
  162. [
  163. "**/*.py",
  164. "BUILD",
  165. ],
  166. ),
  167. )
  168. filegroup(
  169. name = "imagenet_metadata",
  170. srcs = [
  171. "data/imagenet_lsvrc_2015_synsets.txt",
  172. "data/imagenet_metadata.txt",
  173. ],
  174. visibility = ["//visibility:public"],
  175. )