Solved by sbrhss in post #2 
              
              
                Maybe this code snippet can help you:  
#include <torch/torch.h>
#include <torch/script.h>
#include <array>
#include <iostream>
#include <iomanip>

torch::Dimname dimnameFromString(const std::string& str);

int main()
{

	std::cout << std::fixed << std::setprecision(4);

	auto options =
	    torch::…