1

I was going through the MNIST tutorial in caffe2 and I ran into the following error:

RuntimeError: [enforce fail at db.h:190] db_. Cannot open db: /home/Aakash/caffe2_notebooks/tutorial_data/mnist/mnist-train-nchw-lmdb of type lmdb Error from operator: 
output: "dbreader_/home/Aakash/caffe2_notebooks/tutorial_data/mnist/mnist-train-nchw-lmdb" name: "" type: "CreateDB" arg { name: "db_type" s: "lmdb" } arg { name: "db" s: "/home/Aakash/caffe2_notebooks/tutorial_data/mnist/mnist-train-nchw-lmdb" }

Why is this happening?

Shai
  • 111,146
  • 38
  • 238
  • 371
user3125971
  • 139
  • 3
  • 15

1 Answers1

0

Was struggling with this the whole day and finally found the solution.

I am using Python's Anaconda distribution and was facing same issue.

Make following changes inside < CAFFE_ROOT >/scripts/build_anaconda.sh:

-caffe2_cmake_args+=("-DUSE_LMDB=OFF")
+caffe2_cmake_args+=("-DUSE_LMDB=ON")

And then run ./scripts/build_anaconda.sh --install-locally to build the caffe2 source for anaconda.

gaurav
  • 86
  • 6