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

MNIST demo with lmdb (addresses issues 922 and 958) #1008

Merged
merged 4 commits into from
Aug 31, 2014

Conversation

mohomran
Copy link
Contributor

The MNIST demo now supports both lmdb (default) and leveldb. The choice of backend can be set in create_mnist.sh as a command line parameter for convert_mnist_data.bin.

Writing examples individually to the lmdb backend is literally 100x slower than using batches, so now convert_mnist_data.cpp resembles convert_imageset.cpp a lot more closely in that batch writes are used for leveldb and lmdb.

./examples/mnist/train_lenet_consolidated.sh runs to completion. The final accuracy is 99.79% and 99.2% on the training and test sets respectively.

Commit 750f92e among other things removes a bug that is currently in the tip of the dev branch.

  • examples/mnist/create_mnist.sh, l.10-11: missing path to db folders ($EXAMPLE) in rm -rf command

@mohomran mohomran changed the title MNIST demo with lmdb (addresses issue 922 and 958) MNIST demo with lmdb (addresses issues 922 and 958) Aug 29, 2014
@@ -50,7 +50,8 @@ net_param {
top: "data"
top: "label"
data_param {
source: "examples/mnist/mnist_train_leveldb"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update examples/mnist/lenet_train_test.prototxt for the lmdb source too.

@shelhamer
Copy link
Member

Thanks for resolving the consolidated LeNet issue, fixing the MNIST db script bug, and the error message polish.

p.s. Good to see your first PR -- hope to see you at ECCV!

@mohomran
Copy link
Contributor Author

Rebased, squashed and added the requested change. (It seems Travis CI had problems retrieving some packages. That particular commit only changes a bash script and a network definition.)

P.S. Yup, I'll be there, looking forward to seeing you!

@mohomran
Copy link
Contributor Author

For the record, this issue with leveldb is not exclusive to OSX (#522 (comment)), I had the same problem on Debian (wheezy).

shelhamer added a commit that referenced this pull request Aug 31, 2014
convert MNIST demo to lmdb, fixes
@shelhamer shelhamer merged commit 8bf1e60 into BVLC:dev Aug 31, 2014
@mohomran mohomran deleted the mnist_with_lmdb branch September 2, 2014 11:10
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants