summaryrefslogtreecommitdiff
path: root/examples/imagenet
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2014-08-07 11:56:45 -0700
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2014-08-07 11:56:45 -0700
commit3b07be06a459f655b8cfa3e9d87bd534be5247d4 (patch)
tree30c7afb843dd46c1c4f534b48f273ca9f56b052a /examples/imagenet
parent13d625b556ab473f98bd70ac1b13087c50fedddf (diff)
downloadcaffeonacl-3b07be06a459f655b8cfa3e9d87bd534be5247d4.tar.gz
caffeonacl-3b07be06a459f655b8cfa3e9d87bd534be5247d4.tar.bz2
caffeonacl-3b07be06a459f655b8cfa3e9d87bd534be5247d4.zip
consolidate gpu and device_id args in caffe tool
Diffstat (limited to 'examples/imagenet')
-rwxr-xr-xexamples/imagenet/time_imagenet.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/examples/imagenet/time_imagenet.sh b/examples/imagenet/time_imagenet.sh
index c83b0c02..c448b497 100755
--- a/examples/imagenet/time_imagenet.sh
+++ b/examples/imagenet/time_imagenet.sh
@@ -3,20 +3,15 @@
TOOLS=../../build/tools
if [ -z "$1" ]; then
- echo "Using CPU! To run GPU speedtest, use:"
- echo " ./speedtest_imagenet.sh <device ID>"
- echo "(Try ./speedtest_imagenet.sh 0 if you have just one GPU.)"
+ echo "Using CPU! To time GPU mode, use:"
+ echo " ./time_imagenet.sh <device ID>"
+ echo "(Try ./time_imagenet.sh 0 if you have just one GPU.)"
sleep 3 # Let the user read
- WITH_GPU=false
- DEVICE_ID=0
+ GPU=""
else
- WITH_GPU=true
- DEVICE_ID=$1
+ GPU="--gpu=$1"
fi
-$TOOLS/caffe time \
- --model=imagenet_train_val.prototxt \
- --gpu=${WITH_GPU} \
- --device_id=${DEVICE_ID}
+$TOOLS/caffe time --model=imagenet_train_val.prototxt ${GPU}
echo "Done."