#!/bin/bash

BATCH_SIZE=$1
NUM_EPOCH=$2
NUM_GPUS=$3

beginning=`date +%s`
mark=`date +%s`
let dif=mark-beginning
echo "=========== Setting TF benchmark $NUM_GPUS GPU $dif ============"

pushd $ILSVRC2012_BASEDIR/Tensorflow1.8/Code/tf_cnn_benchmarks

python -u tf_cnn_benchmarks.py --model resnet50 --batch_size=$BATCH_SIZE --num_epochs=$NUM_EPOCH --data_format NCHW --local_parameter_device cpu --num_intra_threads 160 --num_inter_threads 2 --device gpu --num_gpus $NUM_GPUS --data_name imagenet --data_dir $ILSVRC2012_BASEDIR/Dataset/PostProcessedTFRecords/

popd

mark=`date +%s`
let dif=mark-beginning
echo "=========== Finished $dif ============"

