This commit is contained in:
Evan Shelhamer 2014-02-25 15:46:08 -08:00
Родитель 4fd2fa20d4
Коммит 04f61b320d
18 изменённых файлов: 68 добавлений и 76 удалений

19
data/cifar10/get_cifar10.sh Executable file
Просмотреть файл

@ -0,0 +1,19 @@
#!/usr/bin/env sh
# This scripts downloads the CIFAR10 (binary version) data and unzips it.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "Downloading..."
wget -q http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz
echo "Unzipping..."
tar -xf cifar-10-binary.tar.gz && rm -f cifar-10-binary.tar.gz
mv cifar-10-batches-bin/* . && rm -rf cifar-10-batches-bin
# Creation is split out because leveldb sometimes causes segfault
# and needs to be re-created.
echo "Done."

Просмотреть файл

@ -1,12 +0,0 @@
#!/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."

Просмотреть файл

@ -1,15 +0,0 @@
#!/usr/bin/env sh
# This scripts downloads the ilsvrc auxiliary files including
# - the ilsvrc image mean, binaryproto
# - synset ids and words
# - the training splits with labels
echo "Downloading..."
wget -q https://www.dropbox.com/s/1cyhk5k5kjcfq92/caffe_ilsvrc_2012.tar.gz
echo "Unzipping..."
tar -xf caffe_ilsvrc_2012.tar.gz && rm -f caffe_ilsvrc_2012.tar.gz
echo "Done."

20
data/ilsvrc12/get_ilsvrc_aux.sh Executable file
Просмотреть файл

@ -0,0 +1,20 @@
#!/usr/bin/env sh
#
# N.B. This does not download the ilsvrcC12 data set, as it is gargantuan.
# This script downloads the imagenet example auxiliary files including:
# - the ilsvrc12 image mean, binaryproto
# - synset ids and words
# - the training splits with labels
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "Downloading..."
wget -q https://www.dropbox.com/s/g5myor4y2scdv95/caffe_ilsvrc12.tar.gz
echo "Unzipping..."
tar -xf caffe_ilsvrc12.tar.gz && rm -f caffe_ilsvrc12.tar.gz
echo "Done."

Просмотреть файл

@ -1,6 +1,9 @@
#!/usr/bin/env sh
# This scripts downloads the mnist data and unzips it.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "Downloading..."
wget -q http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz

Просмотреть файл

@ -3,7 +3,7 @@
// This script converts the CIFAR dataset to the leveldb format used
// by caffe to perform classification.
// Usage:
// convert_cifar_data input_image_file input_label_file output_db_file
// convert_cifar_data input_folder output_db_file
// The CIFAR dataset could be downloaded at
// http://www.cs.toronto.edu/~kriz/cifar.html

Просмотреть файл

@ -1,23 +0,0 @@
#!/usr/bin/env sh
# This scripts downloads the mnist data and unzips it.
echo "Downloading data..."
cd ../data
wget -q http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
wget -q http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
wget -q http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
wget -q http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
echo "Unzipping..."
gunzip train-images-idx3-ubyte.gz
gunzip train-labels-idx1-ubyte.gz
gunzip t10k-images-idx3-ubyte.gz
gunzip t10k-labels-idx1-ubyte.gz
# Creation is split out because leveldb sometimes causes segfault
# and needs to be re-created.
echo "Done."

Просмотреть файл

@ -1,8 +1,17 @@
input: "data"
input_dim: 10
input_dim: 3
input_dim: 227
input_dim: 227
name: "CaffeNet"
layers {
layer {
name: "data"
type: "data"
source: "/home/jiayq/Data/ILSVRC12/train-leveldb"
meanfile: "/home/jiayq/Data/ILSVRC12/image_mean.binaryproto"
batchsize: 256
cropsize: 227
mirror: true
}
top: "data"
top: "label"
}
layers {
layer {
name: "conv1"
@ -347,9 +356,9 @@ layers {
}
layers {
layer {
name: "prob"
type: "softmax"
name: "loss"
type: "softmax_loss"
}
bottom: "fc8"
top: "prob"
bottom: "label"
}

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

0
models/.gitignore поставляемый Normal file
Просмотреть файл

Просмотреть файл

@ -1,17 +1,8 @@
name: "CaffeNet"
layers {
layer {
name: "data"
type: "data"
source: "/home/jiayq/Data/ILSVRC12/train-leveldb"
meanfile: "/home/jiayq/Data/ILSVRC12/image_mean.binaryproto"
batchsize: 256
cropsize: 227
mirror: true
}
top: "data"
top: "label"
}
input: "data"
input_dim: 10
input_dim: 3
input_dim: 227
input_dim: 227
layers {
layer {
name: "conv1"
@ -356,9 +347,9 @@ layers {
}
layers {
layer {
name: "loss"
type: "softmax_loss"
name: "prob"
type: "softmax"
}
bottom: "fc8"
bottom: "label"
top: "prob"
}