-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowAndTellClassify.sh
29 lines (21 loc) · 1.07 KB
/
showAndTellClassify.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#SBATCH --job-name=tensorflowShowandTell${SLURM_ARRAY_TASK_ID}
#SBATCH --time=1:00:00
# To run as an array job, use the following command:
# sbatch --partition=beards --gres=gpu:1 --array=0-0 --mem=8192 --constraint=intel showAndTellClassify.sh
#TODO: Directory containing images with ../*.jpg or format to caption multiple images:
IMAGE_DIR="/work/thpaul/tf_tools/tensorflow/im2txt/myImages/*.jpg"
#TODO: Directory containing model checkpoints.
CHECKPOINT_DIR="/work/thpaul/tf_tools/tensorflow/im2txt/im2txt/model/train"
#TODO: Vocabulary file generated by the preprocessing script.
VOCAB_FILE="/work/thpaul/tf_tools/tensorflow/im2txt/im2txt/data/mscoco/word_counts.txt"
# Build the inference binary.
bazel build -c opt im2txt/run_inference
# Ignore GPU devices (only necessary if your GPU is currently memory
# constrained, for example, by running the training script).
# export CUDA_VISIBLE_DEVICES=""
# Run inference to generate captions.
bazel-bin/im2txt/run_inference \
--checkpoint_path=${CHECKPOINT_DIR} \
--vocab_file=${VOCAB_FILE} \
--input_files=${IMAGE_DIR}