Skip to content

Commit 0f12d4a

Browse files
committed
Fix Bazel incantations in docs
Fixes tensorflow/tensorflow#10239
1 parent 44d98cb commit 0f12d4a

File tree

3 files changed

+32
-16
lines changed

3 files changed

+32
-16
lines changed

im2txt/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ available space for storing the downloaded and processed data.
145145
MSCOCO_DIR="${HOME}/im2txt/data/mscoco"
146146

147147
# Build the preprocessing script.
148-
bazel build im2txt/download_and_preprocess_mscoco
148+
cd tensorflow-models/im2txt
149+
bazel build //im2txt:download_and_preprocess_mscoco
149150

150151
# Run the preprocessing script.
151152
bazel-bin/im2txt/download_and_preprocess_mscoco "${MSCOCO_DIR}"
@@ -211,7 +212,8 @@ INCEPTION_CHECKPOINT="${HOME}/im2txt/data/inception_v3.ckpt"
211212
MODEL_DIR="${HOME}/im2txt/model"
212213

213214
# Build the model.
214-
bazel build -c opt im2txt/...
215+
cd tensorflow-models/im2txt
216+
bazel build -c opt //im2txt/...
215217

216218
# Run the training script.
217219
bazel-bin/im2txt/train \
@@ -304,7 +306,8 @@ VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt"
304306
IMAGE_FILE="${HOME}/im2txt/data/mscoco/raw-data/val2014/COCO_val2014_000000224477.jpg"
305307

306308
# Build the inference binary.
307-
bazel build -c opt im2txt/run_inference
309+
cd tensorflow-models/im2txt
310+
bazel build -c opt //im2txt:run_inference
308311

309312
# Ignore GPU devices (only necessary if your GPU is currently memory
310313
# constrained, for example, by running the training script).

inception/README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ you will not need to interact with the script again.
8686
DATA_DIR=$HOME/imagenet-data
8787

8888
# build the preprocessing script.
89-
bazel build inception/download_and_preprocess_imagenet
89+
cd tensorflow-models/inception
90+
bazel build //inception:download_and_preprocess_imagenet
9091

9192
# run it
9293
bazel-bin/inception/download_and_preprocess_imagenet "${DATA_DIR}"
@@ -153,7 +154,8 @@ To train this model, you simply need to specify the following:
153154
```shell
154155
# Build the model. Note that we need to make sure the TensorFlow is ready to
155156
# use before this as this command will not build TensorFlow.
156-
bazel build inception/imagenet_train
157+
cd tensorflow-models/inception
158+
bazel build //inception:imagenet_train
157159

158160
# run it
159161
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.
189191
```shell
190192
# Build the model. Note that we need to make sure the TensorFlow is ready to
191193
# use before this as this command will not build TensorFlow.
192-
bazel build inception/imagenet_train
194+
cd tensorflow-models/inception
195+
bazel build //inception:imagenet_train
193196

194197
# run it
195198
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:
288291
```shell
289292
# Build the model. Note that we need to make sure the TensorFlow is ready to
290293
# use before this as this command will not build TensorFlow.
291-
bazel build inception/imagenet_distributed_train
294+
cd tensorflow-models/inception
295+
bazel build //inception:imagenet_distributed_train
292296

293297
# To start worker 0, go to the worker0 host and run the following (Note that
294298
# task_id should be in the range [0, num_worker_tasks):
@@ -395,7 +399,8 @@ Briefly, one can evaluate the model by running:
395399
```shell
396400
# Build the model. Note that we need to make sure the TensorFlow is ready to
397401
# use before this as this command will not build TensorFlow.
398-
bazel build inception/imagenet_eval
402+
cd tensorflow-models/inception
403+
bazel build //inception:imagenet_eval
399404

400405
# run it
401406
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.
450455
FLOWERS_DATA_DIR=/tmp/flowers-data/
451456

452457
# build the preprocessing script.
453-
bazel build inception/download_and_preprocess_flowers
458+
cd tensorflow-models/inception
459+
bazel build //inception:download_and_preprocess_flowers
454460

455461
# run it
456462
bazel-bin/inception/download_and_preprocess_flowers "${FLOWERS_DATA_DIR}"
@@ -530,7 +536,8 @@ the flowers data set with the following command.
530536
```shell
531537
# Build the model. Note that we need to make sure the TensorFlow is ready to
532538
# use before this as this command will not build TensorFlow.
533-
bazel build inception/flowers_train
539+
cd tensorflow-models/inception
540+
bazel build //inception:flowers_train
534541

535542
# Path to the downloaded Inception-v3 model.
536543
MODEL_PATH="${INCEPTION_MODEL_DIR}/inception-v3/model.ckpt-157585"
@@ -566,7 +573,8 @@ fine-tuned model, you will need to run `flowers_eval`:
566573
```shell
567574
# Build the model. Note that we need to make sure the TensorFlow is ready to
568575
# use before this as this command will not build TensorFlow.
569-
bazel build inception/flowers_eval
576+
cd tensorflow-models/inception
577+
bazel build //inception:flowers_eval
570578

571579
# Directory where we saved the fine-tuned checkpoint and events files.
572580
TRAIN_DIR=/tmp/flowers_train/
@@ -654,7 +662,8 @@ To run `build_image_data.py`, you can run the following command line:
654662
OUTPUT_DIRECTORY=$HOME/my-custom-data/
655663

656664
# build the preprocessing script.
657-
bazel build inception/build_image_data
665+
cd tensorflow-models/inception
666+
bazel build //inception:build_image_data
658667

659668
# convert the data.
660669
bazel-bin/inception/build_image_data \

skip_thoughts/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ INPUT_FILES="${HOME}/skip_thoughts/bookcorpus/*.txt"
133133
DATA_DIR="${HOME}/skip_thoughts/data"
134134

135135
# Build the preprocessing script.
136-
bazel build -c opt skip_thoughts/data/preprocess_dataset
136+
cd tensorflow-models/skip_thoughts
137+
bazel build -c opt //skip_thoughts/data:preprocess_dataset
137138

138139
# Run the preprocessing script.
139140
bazel-bin/skip_thoughts/data/preprocess_dataset \
@@ -164,7 +165,8 @@ DATA_DIR="${HOME}/skip_thoughts/data"
164165
MODEL_DIR="${HOME}/skip_thoughts/model"
165166

166167
# Build the model.
167-
bazel build -c opt skip_thoughts/...
168+
cd tensorflow-models/skip_thoughts
169+
bazel build -c opt //skip_thoughts/...
168170

169171
# Run the training script.
170172
bazel-bin/skip_thoughts/train \
@@ -269,7 +271,8 @@ WORD2VEC_MODEL="${HOME}/skip_thoughts/googlenews/GoogleNews-vectors-negative300.
269271
EXP_VOCAB_DIR="${HOME}/skip_thoughts/exp_vocab"
270272

271273
# Build the vocabulary expansion script.
272-
bazel build -c opt skip_thoughts/vocabulary_expansion
274+
cd tensorflow-models/skip_thoughts
275+
bazel build -c opt //skip_thoughts:vocabulary_expansion
273276

274277
# Run the vocabulary expansion script.
275278
bazel-bin/skip_thoughts/vocabulary_expansion \
@@ -343,7 +346,8 @@ EMBEDDINGS_FILE="${HOME}/skip_thoughts/exp_vocab/embeddings.npy"
343346
EVAL_DATA_DIR="${HOME}/skip_thoughts/eval_data"
344347

345348
# Build the evaluation script.
346-
bazel build -c opt skip_thoughts/evaluate
349+
cd tensorflow-models/skip_thoughts
350+
bazel build -c opt //skip_thoughts:evaluate
347351

348352
# Run the evaluation script.
349353
bazel-bin/skip_thoughts/evaluate \

0 commit comments

Comments
 (0)