Copilot can generate similar code it looks lie, but the additional explanations from ChatGPT I find to be useful. Here I asked it how to use TorchScript to use a trained neural network in C++, and it walks through the steps: