How to use VS to load pytorch model?

Following are the scenarios

  1. You have a PyTorch model - Use PyTorch C++ Export - https://pytorch.org/tutorials/advanced/cpp_export.html

  2. You have model in ONNX - then either use converter to convert into PyTorch model and then step 1
    or ONNX to Caffe and then use caffe library
    Read here - ONNX: deploying a trained model in a C++ project