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

Error in loading MNIST dataset, convolutional_neural_network #89

Closed
Paras-97 opened this issue Dec 20, 2021 · 3 comments
Closed

Error in loading MNIST dataset, convolutional_neural_network #89

Paras-97 opened this issue Dec 20, 2021 · 3 comments

Comments

@Paras-97
Copy link

Hi,
I am unable to read the images in the MNIST dataset.
below I have listed the error that I am receiving. Can you please help me with it.
Thanks

: ~/Projects/cnn/build$ ./cnn

Convolutional Neural Network

CUDA available. Training on GPU.
terminate called after throwing an instance of 'c10::Error'
what(): Error opening images file at ../../../../data/mnist/train-images-idx3-ubyte
Exception raised from read_images at ../torch/csrc/api/src/data/datasets/mnist.cpp:67 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x6b (0x7f9f8f93e0db in /home/paras/Libraries/libtorch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0xce (0x7f9f8f939d2e in /home/paras/Libraries/libtorch/lib/libc10.so)
frame #2: + 0x43847a2 (0x7f9f0b77e7a2 in /home/paras/Libraries/libtorch/lib/libtorch_cpu.so)
frame #3: torch::data::datasets::MNIST::MNIST(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, torch::data::datasets::MNIST::Mode) + 0x46 (0x7f9f0b77f846 in /home/paras/Libraries/libtorch/lib/libtorch_cpu.so)
frame #4: main + 0x121 (0x55670d49790c in ./cnn)
frame #5: __libc_start_main + 0xf3 (0x7f9ec30140b3 in /lib/x86_64-linux-gnu/libc.so.6)
frame #6: _start + 0x2e (0x55670d49752e in ./cnn)

Aborted (core dumped)

@prabhuomkar
Copy link
Owner

prabhuomkar commented Dec 20, 2021

@Paras-97 did you run cmake -B build -D DOWNLOAD_DATASETS=ON - this will download the dataset
right now the line:

what(): Error opening images file at ../../../../data/mnist/train-images-idx3-ubyte

indicates that dataset isn't available, so while reading this is throwing an error

Also, please go through this section in detail

@prabhuomkar
Copy link
Owner

@Paras-97 can you confirm?

@prabhuomkar
Copy link
Owner

Closing this issue as no further comment

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

No branches or pull requests

2 participants