Skip to content

Commit

Permalink
added inception model
Browse files Browse the repository at this point in the history
  • Loading branch information
martinwicke committed Mar 9, 2016
1 parent 1ecaf09 commit 83ee52c
Show file tree
Hide file tree
Showing 41 changed files with 80,116 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tensorflow"]
path = tensorflow
url = https://github.com/tensorflow/tensorflow.git
37 changes: 37 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local_repository(
name = "tf",
path = __workspace_dir__ + "/tensorflow",
)

load('//tensorflow/tensorflow:workspace.bzl', 'tf_workspace')
tf_workspace("tensorflow/")
# grpc expects //external:protobuf_clib and //external:protobuf_compiler
# to point to the protobuf's compiler library.
bind(
name = "protobuf_clib",
actual = "@tf//google/protobuf:protoc_lib",
)

bind(
name = "protobuf_compiler",
actual = "@tf//google/protobuf:protoc_lib",
)

git_repository(
name = "grpc",
commit = "73979f4",
init_submodules = True,
remote = "https://github.com/grpc/grpc.git",
)

# protobuf expects //external:grpc_cpp_plugin to point to grpc's
# C++ plugin code generator.
bind(
name = "grpc_cpp_plugin",
actual = "@grpc//:grpc_cpp_plugin",
)

bind(
name = "grpc_lib",
actual = "@grpc//:grpc++_unsecure",
)
178 changes: 178 additions & 0 deletions inception/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# Description:
# Example TensorFlow models for ImageNet.

package(default_visibility = [":internal"])

licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

package_group(
name = "internal",
packages = ["//inception/..."],
)

py_library(
name = "dataset",
srcs = [
"dataset.py",
],
deps = [
"@tf//tensorflow:tensorflow_py",
],
)

py_library(
name = "imagenet_data",
srcs = [
"imagenet_data.py",
],
deps = [
":dataset",
],
)

py_library(
name = "flowers_data",
srcs = [
"flowers_data.py",
],
deps = [
":dataset",
],
)

py_library(
name = "image_processing",
srcs = [
"image_processing.py",
],
)

py_library(
name = "inception",
srcs = [
"inception_model.py",
],
deps = [
"@tf//tensorflow:tensorflow_py",
":dataset",
"//inception/slim",
],
)

py_binary(
name = "imagenet_eval",
srcs = [
"imagenet_eval.py",
],
deps = [
":imagenet_data",
":inception_eval",
],
)

py_binary(
name = "flowers_eval",
srcs = [
"flowers_eval.py",
],
deps = [
":flowers_data",
":inception_eval",
],
)

py_library(
name = "inception_eval",
srcs = [
"inception_eval.py",
],
deps = [
"@tf//tensorflow:tensorflow_py",
":image_processing",
":inception",
],
)

py_binary(
name = "imagenet_train",
srcs = [
"imagenet_train.py",
],
deps = [
":imagenet_data",
":inception_train",
],
)

py_binary(
name = "flowers_train",
srcs = [
"flowers_train.py",
],
deps = [
":flowers_data",
":inception_train",
],
)

py_library(
name = "inception_train",
srcs = [
"inception_train.py",
],
deps = [
"@tf//tensorflow:tensorflow_py",
":image_processing",
":inception",
],
)

py_binary(
name = "build_image_data",
srcs = ["data/build_image_data.py"],
deps = [
"@tf//tensorflow:tensorflow_py",
],
)

sh_binary(
name = "download_and_preprocess_flowers",
srcs = ["data/download_and_preprocess_flowers.sh"],
data = [
":build_image_data",
],
)

sh_binary(
name = "download_and_preprocess_imagenet",
srcs = ["data/download_and_preprocess_imagenet.sh"],
data = [
"data/download_imagenet.sh",
"data/imagenet_2012_validation_synset_labels.txt",
"data/imagenet_lsvrc_2015_synsets.txt",
"data/imagenet_metadata.txt",
"data/preprocess_imagenet_validation_data.py",
"data/process_bounding_boxes.py",
":build_imagenet_data",
],
)

py_binary(
name = "build_imagenet_data",
srcs = ["data/build_imagenet_data.py"],
deps = [
"@tf//tensorflow:tensorflow_py",
],
)

filegroup(
name = "srcs",
srcs = glob(
[
"**/*.py",
"BUILD",
],
),
)
Loading

0 comments on commit 83ee52c

Please sign in to comment.