I’m trying to build MNIST sample file from PyTorch Examples. Here’s what I’ve followed as of now:
- Clone examples.
- Open x64 Native tools Command prompt for VS 2019
- Go to the directory and
cmake -DCMAKE_PREFIX_PATH="C:\Users\krshr\Downloads\libtorch\libtorch" -G "NMake Makefiles"
- The files were generated successfully.
- I then ran “nmake”
- It shows some warnings but at last it shows: “Build target mnist”.
- I then copied the dll files (torch.dll, caffe2.dll and c10.dll) from unzipped libtorch (nightly version) to the directory having executable file.
- Once done, I ran: “mnist.exe” in the prompt and looks like it wasn’t successful while loading MNIST data (I had 2 cout statements before and after loading data - only before one gets printed to the console). The error is:
abort() has been called
For CMakeLists.txt and Code: https://github.com/krshrimali/MNIST-Libtorch-Windows
Versions: CMake: 3.15.0-rc1 and Visual Studio 2019 Community