Skip to content

Instantly share code, notes, and snippets.

@jlebar
Created November 14, 2018 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlebar/f3bb841f1d3e03ca7abe17b851fefec3 to your computer and use it in GitHub Desktop.
Save jlebar/f3bb841f1d3e03ca7abe17b851fefec3 to your computer and use it in GitHub Desktop.
Run resnet50 benchmark on GCE
gcloud compute ssh $INSTANCE_NAME
# Clone TensorFlow benchmark repository.
git clone https://github.com/tensorflow/benchmarks.git && cd benchmarks
git reset --hard 1e7d788042dfc6d5e5cd87410c57d5eccee5c664
cd scripts/tf_cnn_benchmarks
## Synthetic data test
# 8 GPUs
python tf_cnn_benchmarks.py \
--batch_size=364 \
--num_batches=100 \
--model=resnet50 \
--optimizer=momentum \
--variable_update=replicated \
--all_reduce_spec=nccl \
--use_fp16=True \
--nodistortions \
--gradient_repacking=2 \
--compute_lr_on_cpu=True \
--single_l2_loss_op=True \
--xla_compile=True \
--num_gpus=8 \
--loss_type_to_report=base_loss
# 1 GPU
python tf_cnn_benchmarks.py \
--batch_size=364 \
--num_batches=100 \
--model=resnet50 \
--optimizer=momentum \
--use_fp16=True \
--nodistortions \
--compute_lr_on_cpu=True \
--single_l2_loss_op=True \
--xla_compile=True \
--loss_type_to_report=base_loss
## Real data test
# add --data_dir=/data/imagenet to the 1 or 8 GPU command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment