Solved by Fugurcali in post #4 
              
              
                Problem solved. After changing to directory of libtorch from “/home/user/folder/libtorch” to “/home/user/libtorch”, I successfully built the network.