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, at::IntList(sizes), options);

std::vector<torch::jit::IValue> inputs;
inputs.push_back(input_tensor.permute({0, 3, 1, 2}));

Note that input_tensor and thus also the permutation don’t own the memory and you need to keep network_input around or clone after from_blob.
Best regards
Thomas