ImFusion C++ SDK 4.5.0
ImFusion::TorchModule Class Reference

#include <TorchPlugin/include/ImFusion/Torch/TorchUtils.h>

Encapsulate a Torch module so that we can use it in our own headers without including libtorch. More...

Detailed Description

Encapsulate a Torch module so that we can use it in our own headers without including libtorch.

Public Member Functions

 TorchModule (const std::string &modelPath)
bool isCorrectlyLoaded () const
torch::jit::IValue forward (const std::vector< torch::jit::IValue > &inputs)
torch::jit::IValue forward (torch::Tensor &input)
torch::jit::IValue forwardAsList (torch::Tensor &input)
void toCPU ()
void toCUDA (int cudaDeviceIndex)
void toMPS ()
void disableJITRecompile ()
void revertJITRecompile ()

The documentation for this class was generated from the following file:
  • TorchPlugin/include/ImFusion/Torch/TorchUtils.h
Search Tab / S to search, Esc to close