summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorKai Li <kaili_kloud@163.com>2014-02-10 08:39:42 (GMT)
committerKai Li <kaili_kloud@163.com>2014-02-11 03:01:35 (GMT)
commitb477b0699e75fe0fc77aad15dc8df75d2f7c2bf7 (patch)
treee60556f1189315aafaea05fef8e5cf531dbeb9e3 /data
parent0cef1e95683f93c08aae261021c035d249409c88 (diff)
downloadcaffeonacl-b477b0699e75fe0fc77aad15dc8df75d2f7c2bf7.zip
caffeonacl-b477b0699e75fe0fc77aad15dc8df75d2f7c2bf7.tar.gz
caffeonacl-b477b0699e75fe0fc77aad15dc8df75d2f7c2bf7.tar.bz2
Update script to parse log format that contains test iteration
Diffstat (limited to 'data')
-rwxr-xr-xdata/create_mnist.sh12
-rwxr-xr-xdata/get_mnist.sh6
2 files changed, 14 insertions, 4 deletions
diff --git a/data/create_mnist.sh b/data/create_mnist.sh
new file mode 100755
index 0000000..6a93d8f
--- /dev/null
+++ b/data/create_mnist.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env sh
+# This script converts the mnist data into leveldb format.
+
+echo "Creating leveldb..."
+
+rm -rf mnist-train-leveldb
+rm -rf mnist-test-leveldb
+
+../build/examples/convert_mnist_data.bin train-images-idx3-ubyte train-labels-idx1-ubyte mnist-train-leveldb
+../build/examples/convert_mnist_data.bin t10k-images-idx3-ubyte t10k-labels-idx1-ubyte mnist-test-leveldb
+
+echo "Done." \ No newline at end of file
diff --git a/data/get_mnist.sh b/data/get_mnist.sh
index c807a7b..d624dc0 100755
--- a/data/get_mnist.sh
+++ b/data/get_mnist.sh
@@ -15,9 +15,7 @@ gunzip train-labels-idx1-ubyte.gz
gunzip t10k-images-idx3-ubyte.gz
gunzip t10k-labels-idx1-ubyte.gz
-echo "Creating leveldb..."
-
-../build/examples/convert_mnist_data.bin train-images-idx3-ubyte train-labels-idx1-ubyte mnist-train-leveldb
-../build/examples/convert_mnist_data.bin t10k-images-idx3-ubyte t10k-labels-idx1-ubyte mnist-test-leveldb
+# Creation is split out because leveldb sometimes causes segfault
+# and needs to be re-created.
echo "Done."