You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got this too , did you solve it?
我解决了,问题的原因在于四个mnist文件没有下载到./data中,你需要使用这一个命令下载下来就好了: ~/projects/pytorch_cpp/cpp/mnist/build$ python3 ../../tools/download_mnist.py -d ./data
then do make
Done
terminate called after throwing an instance of 'c10::Error'
what(): Error opening images file at ./data/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 >) + 0x69 (0x7f94f2a259f9 in /home/tensorbook/Downloads/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&) + 0xd2 (0x7f94f2a22012 in /home/tensorbook/Downloads/libtorch/lib/libc10.so)
frame #2: + 0x3e1dc54 (0x7f94e3983c54 in /home/tensorbook/Downloads/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 (0x7f94e3984ab6 in /home/tensorbook/Downloads/libtorch/lib/libtorch_cpu.so)
frame #4: main + 0x86 (0x55dabc296f4e in ./mnist)
frame #5: __libc_start_main + 0xd5 (0x7f94df72e565 in /lib/x86_64-linux-gnu/libc.so.6)
frame #6: _start + 0x2e (0x55dabc296dee in ./mnist)
The text was updated successfully, but these errors were encountered: