Struct tch::jit::CModule [−][src]
pub struct CModule { /* fields omitted */ }
Expand description
A jit PyTorch module.
These modules can be created via the TorchScript python api.
Implementations
Loads a PyTorch saved JIT model from a file.
Loads a PyTorch saved JIT model from a file onto the given device.
This function loads the model directly on the specified device, which means it also allows loading a GPU model on the CPU without having a CUDA enabled GPU.
Loads a PyTorch saved JIT model from a read instance.
Loads a PyTorch saved JIT model from a read instance.
This function loads the model directly on the specified device, which means it also allows loading a GPU model on the CPU without having a CUDA enabled GPU.
Performs the forward pass for a model on some specified tensor inputs.
Performs the forward pass for a model on some specified ivalue inputs.
Runs a specified entry point for a model on some given tensor inputs.
Runs a specified entry point for a model on some given ivalue inputs.
Switches the module to evaluation mode.
Switches the module to training mode.
Saves a module to a given path.
Loads some named tensors from a module