Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
bbc86cf6
Commit
bbc86cf6
authored
May 28, 2017
by
gunan
Committed by
GitHub
May 28, 2017
Browse files
Merge pull request #1510 from jart/fix-inception-doc
Fix Bazel incantations in docs
parents
44d98cb9
0f12d4a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
16 deletions
+32
-16
im2txt/README.md
im2txt/README.md
+6
-3
inception/README.md
inception/README.md
+18
-9
skip_thoughts/README.md
skip_thoughts/README.md
+8
-4
No files found.
im2txt/README.md
View file @
bbc86cf6
...
@@ -145,7 +145,8 @@ available space for storing the downloaded and processed data.
...
@@ -145,7 +145,8 @@ available space for storing the downloaded and processed data.
MSCOCO_DIR
=
"
${
HOME
}
/im2txt/data/mscoco"
MSCOCO_DIR
=
"
${
HOME
}
/im2txt/data/mscoco"
# Build the preprocessing script.
# Build the preprocessing script.
bazel build im2txt/download_and_preprocess_mscoco
cd
tensorflow-models/im2txt
bazel build //im2txt:download_and_preprocess_mscoco
# Run the preprocessing script.
# Run the preprocessing script.
bazel-bin/im2txt/download_and_preprocess_mscoco
"
${
MSCOCO_DIR
}
"
bazel-bin/im2txt/download_and_preprocess_mscoco
"
${
MSCOCO_DIR
}
"
...
@@ -211,7 +212,8 @@ INCEPTION_CHECKPOINT="${HOME}/im2txt/data/inception_v3.ckpt"
...
@@ -211,7 +212,8 @@ INCEPTION_CHECKPOINT="${HOME}/im2txt/data/inception_v3.ckpt"
MODEL_DIR
=
"
${
HOME
}
/im2txt/model"
MODEL_DIR
=
"
${
HOME
}
/im2txt/model"
# Build the model.
# Build the model.
bazel build
-c
opt im2txt/...
cd
tensorflow-models/im2txt
bazel build
-c
opt //im2txt/...
# Run the training script.
# Run the training script.
bazel-bin/im2txt/train
\
bazel-bin/im2txt/train
\
...
@@ -304,7 +306,8 @@ VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt"
...
@@ -304,7 +306,8 @@ VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt"
IMAGE_FILE
=
"
${
HOME
}
/im2txt/data/mscoco/raw-data/val2014/COCO_val2014_000000224477.jpg"
IMAGE_FILE
=
"
${
HOME
}
/im2txt/data/mscoco/raw-data/val2014/COCO_val2014_000000224477.jpg"
# Build the inference binary.
# Build the inference binary.
bazel build
-c
opt im2txt/run_inference
cd
tensorflow-models/im2txt
bazel build
-c
opt //im2txt:run_inference
# Ignore GPU devices (only necessary if your GPU is currently memory
# Ignore GPU devices (only necessary if your GPU is currently memory
# constrained, for example, by running the training script).
# constrained, for example, by running the training script).
...
...
inception/README.md
View file @
bbc86cf6
...
@@ -86,7 +86,8 @@ you will not need to interact with the script again.
...
@@ -86,7 +86,8 @@ you will not need to interact with the script again.
DATA_DIR
=
$HOME
/imagenet-data
DATA_DIR
=
$HOME
/imagenet-data
# build the preprocessing script.
# build the preprocessing script.
bazel build inception/download_and_preprocess_imagenet
cd
tensorflow-models/inception
bazel build //inception:download_and_preprocess_imagenet
# run it
# run it
bazel-bin/inception/download_and_preprocess_imagenet
"
${
DATA_DIR
}
"
bazel-bin/inception/download_and_preprocess_imagenet
"
${
DATA_DIR
}
"
...
@@ -153,7 +154,8 @@ To train this model, you simply need to specify the following:
...
@@ -153,7 +154,8 @@ To train this model, you simply need to specify the following:
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/imagenet_train
cd
tensorflow-models/inception
bazel build //inception:imagenet_train
# run it
# run it
bazel-bin/inception/imagenet_train
--num_gpus
=
1
--batch_size
=
32
--train_dir
=
/tmp/imagenet_train
--data_dir
=
/tmp/imagenet_data
bazel-bin/inception/imagenet_train
--num_gpus
=
1
--batch_size
=
32
--train_dir
=
/tmp/imagenet_train
--data_dir
=
/tmp/imagenet_data
...
@@ -189,7 +191,8 @@ GPU cards.
...
@@ -189,7 +191,8 @@ GPU cards.
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/imagenet_train
cd
tensorflow-models/inception
bazel build //inception:imagenet_train
# run it
# run it
bazel-bin/inception/imagenet_train
--num_gpus
=
2
--batch_size
=
64
--train_dir
=
/tmp/imagenet_train
bazel-bin/inception/imagenet_train
--num_gpus
=
2
--batch_size
=
64
--train_dir
=
/tmp/imagenet_train
...
@@ -288,7 +291,8 @@ running. Several things to note here:
...
@@ -288,7 +291,8 @@ running. Several things to note here:
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/imagenet_distributed_train
cd
tensorflow-models/inception
bazel build //inception:imagenet_distributed_train
# To start worker 0, go to the worker0 host and run the following (Note that
# To start worker 0, go to the worker0 host and run the following (Note that
# task_id should be in the range [0, num_worker_tasks):
# task_id should be in the range [0, num_worker_tasks):
...
@@ -395,7 +399,8 @@ Briefly, one can evaluate the model by running:
...
@@ -395,7 +399,8 @@ Briefly, one can evaluate the model by running:
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/imagenet_eval
cd
tensorflow-models/inception
bazel build //inception:imagenet_eval
# run it
# run it
bazel-bin/inception/imagenet_eval
--checkpoint_dir
=
/tmp/imagenet_train
--eval_dir
=
/tmp/imagenet_eval
bazel-bin/inception/imagenet_eval
--checkpoint_dir
=
/tmp/imagenet_train
--eval_dir
=
/tmp/imagenet_eval
...
@@ -450,7 +455,8 @@ but feel free to edit accordingly.
...
@@ -450,7 +455,8 @@ but feel free to edit accordingly.
FLOWERS_DATA_DIR
=
/tmp/flowers-data/
FLOWERS_DATA_DIR
=
/tmp/flowers-data/
# build the preprocessing script.
# build the preprocessing script.
bazel build inception/download_and_preprocess_flowers
cd
tensorflow-models/inception
bazel build //inception:download_and_preprocess_flowers
# run it
# run it
bazel-bin/inception/download_and_preprocess_flowers
"
${
FLOWERS_DATA_DIR
}
"
bazel-bin/inception/download_and_preprocess_flowers
"
${
FLOWERS_DATA_DIR
}
"
...
@@ -530,7 +536,8 @@ the flowers data set with the following command.
...
@@ -530,7 +536,8 @@ the flowers data set with the following command.
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/flowers_train
cd
tensorflow-models/inception
bazel build //inception:flowers_train
# Path to the downloaded Inception-v3 model.
# Path to the downloaded Inception-v3 model.
MODEL_PATH
=
"
${
INCEPTION_MODEL_DIR
}
/inception-v3/model.ckpt-157585"
MODEL_PATH
=
"
${
INCEPTION_MODEL_DIR
}
/inception-v3/model.ckpt-157585"
...
@@ -566,7 +573,8 @@ fine-tuned model, you will need to run `flowers_eval`:
...
@@ -566,7 +573,8 @@ fine-tuned model, you will need to run `flowers_eval`:
```
shell
```
shell
# Build the model. Note that we need to make sure the TensorFlow is ready to
# Build the model. Note that we need to make sure the TensorFlow is ready to
# use before this as this command will not build TensorFlow.
# use before this as this command will not build TensorFlow.
bazel build inception/flowers_eval
cd
tensorflow-models/inception
bazel build //inception:flowers_eval
# Directory where we saved the fine-tuned checkpoint and events files.
# Directory where we saved the fine-tuned checkpoint and events files.
TRAIN_DIR
=
/tmp/flowers_train/
TRAIN_DIR
=
/tmp/flowers_train/
...
@@ -654,7 +662,8 @@ To run `build_image_data.py`, you can run the following command line:
...
@@ -654,7 +662,8 @@ To run `build_image_data.py`, you can run the following command line:
OUTPUT_DIRECTORY
=
$HOME
/my-custom-data/
OUTPUT_DIRECTORY
=
$HOME
/my-custom-data/
# build the preprocessing script.
# build the preprocessing script.
bazel build inception/build_image_data
cd
tensorflow-models/inception
bazel build //inception:build_image_data
# convert the data.
# convert the data.
bazel-bin/inception/build_image_data
\
bazel-bin/inception/build_image_data
\
...
...
skip_thoughts/README.md
View file @
bbc86cf6
...
@@ -133,7 +133,8 @@ INPUT_FILES="${HOME}/skip_thoughts/bookcorpus/*.txt"
...
@@ -133,7 +133,8 @@ INPUT_FILES="${HOME}/skip_thoughts/bookcorpus/*.txt"
DATA_DIR
=
"
${
HOME
}
/skip_thoughts/data"
DATA_DIR
=
"
${
HOME
}
/skip_thoughts/data"
# Build the preprocessing script.
# Build the preprocessing script.
bazel build
-c
opt skip_thoughts/data/preprocess_dataset
cd
tensorflow-models/skip_thoughts
bazel build
-c
opt //skip_thoughts/data:preprocess_dataset
# Run the preprocessing script.
# Run the preprocessing script.
bazel-bin/skip_thoughts/data/preprocess_dataset
\
bazel-bin/skip_thoughts/data/preprocess_dataset
\
...
@@ -164,7 +165,8 @@ DATA_DIR="${HOME}/skip_thoughts/data"
...
@@ -164,7 +165,8 @@ DATA_DIR="${HOME}/skip_thoughts/data"
MODEL_DIR
=
"
${
HOME
}
/skip_thoughts/model"
MODEL_DIR
=
"
${
HOME
}
/skip_thoughts/model"
# Build the model.
# Build the model.
bazel build
-c
opt skip_thoughts/...
cd
tensorflow-models/skip_thoughts
bazel build
-c
opt //skip_thoughts/...
# Run the training script.
# Run the training script.
bazel-bin/skip_thoughts/train
\
bazel-bin/skip_thoughts/train
\
...
@@ -269,7 +271,8 @@ WORD2VEC_MODEL="${HOME}/skip_thoughts/googlenews/GoogleNews-vectors-negative300.
...
@@ -269,7 +271,8 @@ WORD2VEC_MODEL="${HOME}/skip_thoughts/googlenews/GoogleNews-vectors-negative300.
EXP_VOCAB_DIR
=
"
${
HOME
}
/skip_thoughts/exp_vocab"
EXP_VOCAB_DIR
=
"
${
HOME
}
/skip_thoughts/exp_vocab"
# Build the vocabulary expansion script.
# Build the vocabulary expansion script.
bazel build
-c
opt skip_thoughts/vocabulary_expansion
cd
tensorflow-models/skip_thoughts
bazel build
-c
opt //skip_thoughts:vocabulary_expansion
# Run the vocabulary expansion script.
# Run the vocabulary expansion script.
bazel-bin/skip_thoughts/vocabulary_expansion
\
bazel-bin/skip_thoughts/vocabulary_expansion
\
...
@@ -343,7 +346,8 @@ EMBEDDINGS_FILE="${HOME}/skip_thoughts/exp_vocab/embeddings.npy"
...
@@ -343,7 +346,8 @@ EMBEDDINGS_FILE="${HOME}/skip_thoughts/exp_vocab/embeddings.npy"
EVAL_DATA_DIR
=
"
${
HOME
}
/skip_thoughts/eval_data"
EVAL_DATA_DIR
=
"
${
HOME
}
/skip_thoughts/eval_data"
# Build the evaluation script.
# Build the evaluation script.
bazel build
-c
opt skip_thoughts/evaluate
cd
tensorflow-models/skip_thoughts
bazel build
-c
opt //skip_thoughts:evaluate
# Run the evaluation script.
# Run the evaluation script.
bazel-bin/skip_thoughts/evaluate
\
bazel-bin/skip_thoughts/evaluate
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment