Solved by tom in post #7 
              
              
                Glad you solved it! 
If anyone is searching for a more compact and efficient solution, you might try something like 
std::vector<int64_t> sizes = {1, network_input.rows, network_input.cols, 3};
torch::TensorOptions options(at::kFloat);
torch::Tensor input_tensor = torch::from_blob(network_input.data…