Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selective search window proposals and better batching of images #2

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TEST_BINS := ${TEST_OBJS:.o=.testbin}
# Derive include and lib directories
##############################
CUDA_INCLUDE_DIR := $(CUDA_DIR)/include
CUDA_LIB_DIR := $(CUDA_DIR)/lib64 $(CUDA_DIR)/lib
CUDA_LIB_DIR := $(CUDA_DIR)/lib $(CUDA_DIR)/lib64
MKL_INCLUDE_DIR := $(MKL_DIR)/include
MKL_LIB_DIR := $(MKL_DIR)/lib $(MKL_DIR)/lib/intel64

Expand Down
12 changes: 0 additions & 12 deletions data/get_cifar.sh

This file was deleted.

5 changes: 5 additions & 0 deletions data/get_mnist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ gunzip train-labels-idx1-ubyte.gz
gunzip t10k-images-idx3-ubyte.gz
gunzip t10k-labels-idx1-ubyte.gz

echo "Creating leveldb..."

../examples/convert_mnist_data.bin train-images-idx3-ubyte train-labels-idx1-ubyte mnist-train-leveldb
../examples/convert_mnist_data.bin t10k-images-idx3-ubyte t10k-labels-idx1-ubyte mnist-test-leveldb

echo "Done."
4 changes: 2 additions & 2 deletions data/lenet.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layers {
layer {
name: "mnist"
type: "data"
source: "data/mnist-train-leveldb"
source: "mnist-train-leveldb"
batchsize: 64
scale: 0.00390625
}
Expand Down Expand Up @@ -114,7 +114,7 @@ layers {
}
layers {
layer {
name: "prob"
name: "loss"
type: "softmax_loss"
}
bottom: "ip2"
Expand Down
29 changes: 22 additions & 7 deletions data/lenet_solver.prototxt
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
train_net: "data/lenet.prototxt"
test_net: "data/lenet_test.prototxt"
# The training protocol buffer definition
train_net: "lenet.prototxt"
# The testing protocol buffer definition
test_net: "lenet_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of MNIST, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 500 training iterations.
test_interval: 500
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.01
momentum: 0.9
weight_decay: 0.0005
# The learning rate policy
lr_policy: "inv"
gamma: 0.0001
power: 0.75
# Display every 100 iterations
display: 100
max_iter: 5000
momentum: 0.9
weight_decay: 0.0005
test_iter: 100
test_interval: 500
# The maximum number of iterations
max_iter: 10000
# snapshot intermediate results
snapshot: 5000
snapshot_prefix: "lenet"
# solver mode: 0 for CPU and 1 for GPU
solver_mode: 1
2 changes: 1 addition & 1 deletion data/lenet_test.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layers {
layer {
name: "mnist"
type: "data"
source: "data/mnist-test-leveldb"
source: "mnist-test-leveldb"
batchsize: 100
scale: 0.00390625
}
Expand Down
3 changes: 3 additions & 0 deletions data/train_mnist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

GLOG_logtostderr=1 ../examples/train_net.bin lenet_solver.prototxt
2 changes: 1 addition & 1 deletion examples/convert_imageset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main(int argc, char** argv) {
LOG(INFO) << "Shuffling data";
std::random_shuffle(lines.begin(), lines.end());
}
LOG(INFO) << "A total of " << lines.size() << "images.";
LOG(INFO) << "A total of " << lines.size() << " images.";

leveldb::DB* db;
leveldb::Options options;
Expand Down
3 changes: 0 additions & 3 deletions examples/finetune_net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ int main(int argc, char** argv) {
return 0;
}

Caffe::SetDevice(0);
Caffe::set_mode(Caffe::GPU);

SolverParameter solver_param;
ReadProtoFromTextFile(argv[1], &solver_param);

Expand Down
33 changes: 0 additions & 33 deletions examples/test_read_imagenet.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions examples/train_net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ int main(int argc, char** argv) {
return 0;
}

Caffe::SetDevice(0);
Caffe::set_mode(Caffe::GPU);

SolverParameter solver_param;
ReadProtoFromTextFile(argv[1], &solver_param);

Expand Down
Loading