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
8a22c8ae
Commit
8a22c8ae
authored
Mar 15, 2017
by
Chris Shallue
Committed by
GitHub
Mar 15, 2017
Browse files
Merge pull request #1185 from cshallue/master
Small clarification to documentation
parents
5978a4a1
c2261189
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
im2txt/README.md
im2txt/README.md
+7
-3
im2txt/im2txt/run_inference.py
im2txt/im2txt/run_inference.py
+2
-0
No files found.
im2txt/README.md
View file @
8a22c8ae
...
...
@@ -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.
```
shell
# Directory containing model checkpoints.
CHECKPOINT_DIR
=
"
${
HOME
}
/im2txt/model/train"
# Path to checkpoint file or a directory containing checkpoint files. Passing
# 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.
VOCAB_FILE
=
"
${
HOME
}
/im2txt/data/mscoco/word_counts.txt"
...
...
@@ -314,7 +318,7 @@ export CUDA_VISIBLE_DEVICES=""
# Run inference to generate captions.
bazel-bin/im2txt/run_inference
\
--checkpoint_path
=
${
CHECKPOINT_
DIR
}
\
--checkpoint_path
=
${
CHECKPOINT_
PATH
}
\
--vocab_file
=
${
VOCAB_FILE
}
\
--input_files
=
${
IMAGE_FILE
}
```
...
...
im2txt/im2txt/run_inference.py
View file @
8a22c8ae
...
...
@@ -39,6 +39,8 @@ tf.flags.DEFINE_string("input_files", "",
"File pattern or comma-separated list of file patterns "
"of image files."
)
tf
.
logging
.
set_verbosity
(
tf
.
logging
.
INFO
)
def
main
(
_
):
# Build the inference graph.
...
...
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