Commit 8a22c8ae authored by Chris Shallue's avatar Chris Shallue Committed by GitHub
Browse files

Merge pull request #1185 from cshallue/master

Small clarification to documentation
parents 5978a4a1 c2261189
...@@ -296,8 +296,12 @@ Your trained *Show and Tell* model can generate captions for any JPEG image! The ...@@ -296,8 +296,12 @@ Your trained *Show and Tell* model can generate captions for any JPEG image! The
following command line will generate captions for an image from the test set. following command line will generate captions for an image from the test set.
```shell ```shell
# Directory containing model checkpoints. # Path to checkpoint file or a directory containing checkpoint files. Passing
CHECKPOINT_DIR="${HOME}/im2txt/model/train" # a directory will only work if there is also a file named 'checkpoint' which
# lists the available checkpoints in the directory. It will not work if you
# point to a directory with just a copy of a model checkpoint: in that case,
# you will need to pass the checkpoint path explicitly.
CHECKPOINT_PATH="${HOME}/im2txt/model/train"
# Vocabulary file generated by the preprocessing script. # Vocabulary file generated by the preprocessing script.
VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt" VOCAB_FILE="${HOME}/im2txt/data/mscoco/word_counts.txt"
...@@ -314,7 +318,7 @@ export CUDA_VISIBLE_DEVICES="" ...@@ -314,7 +318,7 @@ export CUDA_VISIBLE_DEVICES=""
# Run inference to generate captions. # Run inference to generate captions.
bazel-bin/im2txt/run_inference \ bazel-bin/im2txt/run_inference \
--checkpoint_path=${CHECKPOINT_DIR} \ --checkpoint_path=${CHECKPOINT_PATH} \
--vocab_file=${VOCAB_FILE} \ --vocab_file=${VOCAB_FILE} \
--input_files=${IMAGE_FILE} --input_files=${IMAGE_FILE}
``` ```
......
...@@ -39,6 +39,8 @@ tf.flags.DEFINE_string("input_files", "", ...@@ -39,6 +39,8 @@ tf.flags.DEFINE_string("input_files", "",
"File pattern or comma-separated list of file patterns " "File pattern or comma-separated list of file patterns "
"of image files.") "of image files.")
tf.logging.set_verbosity(tf.logging.INFO)
def main(_): def main(_):
# Build the inference graph. # Build the inference graph.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment