Link correct CUDA library (6.5 in case of SegNet)
!sudo unlink /usr/local/cuda
!sudo ln -s /usr/local/cuda-6.5 /usr/local/cuda
Set path to SegNet installation
SEGNET_PATH=/opt/SegNet
SEGNET_CAFFE=${SEGNET_PATH}/caffe-segnet
# Train SegNet with a random set of weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/segnet_solver.prototxt \
> stdoutSeg.txt 2> stderrSeg.txt
# Train SegNet with VGG16 initial weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/segnet_solver.prototxt \
-weights ${SEGNET_PATH}/Models/Training/VGG_ILSVRC_16_layers.caffemodel \
> stdoutSegVGG.txt 2> stderrSegVGG.txt
# Train SegNet with a random set of weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/segnet_basic_solver.prototxt \
> stdoutSegB.txt 2> stderrSegB.txt
# Train SegNet with VGG16 initial weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/segnet_basic_solver.prototxt \
-weights ${SEGNET_PATH}/Models/Training/VGG_ILSVRC_16_layers.caffemodel \
> stdoutSegBVGG.txt 2> stderrSegBVGG.txt
# Train SegNet with a random set of weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/bayesian_segnet_solver.prototxt \
> stdoutBay.txt 2> stderrBay.txt
# Train SegNet with VGG16 initial weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/bayesian_segnet_solver.prototxt \
-weights ${SEGNET_PATH}/Models/Training/VGG_ILSVRC_16_layers.caffemodel \
> stdoutBayVGG.txt 2> stderrBayVGG.txt
Bayesian SegNet Basic Training
# Train SegNet with a random set of weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/bayesian_segnet_basic_solver.prototxt \
> stdoutBayB.txt 2> stderrBayB.txt
# Train SegNet with VGG16 initial weights
${SEGNET_CAFFE}/build/tools/caffe train -gpu 0 \
-solver ${SEGNET_PATH}/Models/bayesian_segnet_basic_solver.prototxt \
-weights ${SEGNET_PATH}/Models/Training/VGG_ILSVRC_16_layers.caffemodel \
> stdoutBayBVGG.txt 2> stderrBayBVGG.txt