What does the error say ? There’s usually pretty good explaining message. Do you catch those errors ? ->
try
{
	auto temp_tensor = torch::randn({ 3, 4 }).to(torch::kInt32);
	int* temp_arr = temp_tensor.data<int>();
}
catch (std::runtime_error& e)
{
  std::cout << e.what() << std::endl;
}
catch (const c10::Error& e)
{
   std::cout << e.msg() << std::endl;
}

system("PAUSE");