caffe/examples/mnist/create_mnist.sh

22 строки
627 B
Bash
Исходник Обычный вид История

2014-02-25 10:22:30 +04:00
#!/usr/bin/env sh
# This script converts the mnist data into lmdb/leveldb format,
# depending on the value assigned to $BACKEND.
2014-02-25 10:22:30 +04:00
2014-08-29 03:34:57 +04:00
EXAMPLE=examples/mnist
DATA=data/mnist
BUILD=build/examples/mnist
2014-08-29 19:04:25 +04:00
BACKEND="lmdb"
2014-02-25 10:22:30 +04:00
echo "Creating ${BACKEND}..."
2014-02-25 10:22:30 +04:00
rm -rf $EXAMPLE/mnist_train_${BACKEND}
rm -rf $EXAMPLE/mnist_test_${BACKEND}
2014-02-25 10:22:30 +04:00
2014-08-29 03:34:57 +04:00
$BUILD/convert_mnist_data.bin $DATA/train-images-idx3-ubyte \
$DATA/train-labels-idx1-ubyte $EXAMPLE/mnist_train_${BACKEND} --backend=${BACKEND}
2014-08-29 03:34:57 +04:00
$BUILD/convert_mnist_data.bin $DATA/t10k-images-idx3-ubyte \
$DATA/t10k-labels-idx1-ubyte $EXAMPLE/mnist_test_${BACKEND} --backend=${BACKEND}
2014-02-25 10:22:30 +04:00
echo "Done."