From 84917d6ccae60fc4063a5d1bb68b86e658e80545 Mon Sep 17 00:00:00 2001 From: Sergey Karayev Date: Wed, 3 Sep 2014 15:42:46 +0100 Subject: [PATCH] removing unneeded scripts from imagenet example --- examples/imagenet/readme.md | 10 +++++++--- examples/imagenet/resume_training.sh | 7 ------- examples/imagenet/time_imagenet.sh | 17 ----------------- examples/imagenet/train_alexnet.sh | 5 ----- examples/imagenet/train_imagenet.sh | 5 ----- 5 files changed, 7 insertions(+), 37 deletions(-) delete mode 100755 examples/imagenet/resume_training.sh delete mode 100755 examples/imagenet/time_imagenet.sh delete mode 100755 examples/imagenet/train_alexnet.sh delete mode 100755 examples/imagenet/train_imagenet.sh diff --git a/examples/imagenet/readme.md b/examples/imagenet/readme.md index 1cd4678..8ce3644 100644 --- a/examples/imagenet/readme.md +++ b/examples/imagenet/readme.md @@ -87,16 +87,20 @@ Training ImageNet Ready? Let's train. - ./train_imagenet.sh + ./build/tools/caffe train --solver=examples/imagenet/imagenet_solver.prototxt -Sit back and enjoy! On my K20 machine, every 20 iterations take about 36 seconds to run, so effectively about 7 ms per image for the full forward-backward pass. About 2.5 ms of this is on forward, and the rest is backward. If you are interested in dissecting the computation time, you can look at `examples/net_speed_benchmark.cpp`, but it was written purely for debugging purpose, so you may need to figure a few things out yourself. +Sit back and enjoy! + +On my K20 machine, every 20 iterations take about 36 seconds to run, so effectively about 7 ms per image for the full forward-backward pass. About 2.5 ms of this is on forward, and the rest is backward. If you are interested in dissecting the computation time, you can run + + ./build/tools/caffe time --model=models/bvlc_reference_caffenet/train_val.prototxt Resume Training? ---------------- We all experience times when the power goes out, or we feel like rewarding ourself a little by playing Battlefield (does someone still remember Quake?). Since we are snapshotting intermediate results during training, we will be able to resume from snapshots. This can be done as easy as: - ./resume_training.sh + ./build/tools/caffe train --solver=examples/imagenet/imagenet_solver.prototxt --snapshot=examples/imagenet/caffe_imagenet_10000.solverstate where in the script `imagenet_train_1000.solverstate` is the solver state snapshot that stores all necessary information to recover the exact solver state (including the parameters, momentum history, etc). diff --git a/examples/imagenet/resume_training.sh b/examples/imagenet/resume_training.sh deleted file mode 100755 index 3c964b5..0000000 --- a/examples/imagenet/resume_training.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -./build/tools/caffe train \ - --solver=examples/imagenet/imagenet_solver.prototxt \ - --snapshot=examples/imagenet/caffe_imagenet_10000.solverstate - -echo "Done." diff --git a/examples/imagenet/time_imagenet.sh b/examples/imagenet/time_imagenet.sh deleted file mode 100755 index 3f46e0e..0000000 --- a/examples/imagenet/time_imagenet.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env sh - -if [ -z "$1" ]; then - echo "Using CPU! To time GPU mode, use:" - echo " ./time_imagenet.sh " - echo "(Try ./time_imagenet.sh 0 if you have just one GPU.)" - sleep 3 # Let the user read - GPU="" -else - GPU="--gpu=$1" -fi - -./build/tools/caffe time \ - --model=examples/imagenet/imagenet_train_val.prototxt \ - ${GPU} - -echo "Done." diff --git a/examples/imagenet/train_alexnet.sh b/examples/imagenet/train_alexnet.sh deleted file mode 100755 index 1ddcbee..0000000 --- a/examples/imagenet/train_alexnet.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -./build/tools/caffe train --solver=examples/imagenet/alexnet_solver.prototxt - -echo "Done." diff --git a/examples/imagenet/train_imagenet.sh b/examples/imagenet/train_imagenet.sh deleted file mode 100755 index cba2ad5..0000000 --- a/examples/imagenet/train_imagenet.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -./build/tools/caffe train --solver=examples/imagenet/imagenet_solver.prototxt - -echo "Done." -- 2.7.4