I changed like this:
std::string mnistpath = “C:\Users\Administrator\Desktop\MINIST_data\MNIST\raw”;
torch::data::datasets::MNIST cMnist = torch::data::datasets::MNIST(mnistpath);
auto data_loader = torch::data::make_data_loader(cMnist.map(torch::data::transforms::Stack<>()));