It is already solved in this forum.
see

  
    
    
    【PyTorch1.0】 C++ mnist demo Error C++
  
  
    Hi, when i wanna try the demo proposed by goldsborough. I strike an error and hope someone could solve this. Thank you very much. 
Enviroment: 
gcc:  4.8.5 
g++:  4.8.5 
cuda: 9.0 
system: ubuntu18.04 
libtorch: https://download.pytorch.org/libtorch/nightly/cu90/libtorch-shared-with-deps-latest.zip 
cmake: 3.13 
Code: mnist_example.cpp 
#include <torch/torch.h>

// Define a new Module.
struct Net : torch::nn::Module {
  Net() {
    // Construct and register two Linear submodules.
    fc1 …
  



  
      
      GitHub
  
  
    

TonyzBi/libtorch-mnist 8

Contribute to TonyzBi/libtorch-mnist development by creating an account on GitHub.