mixin 🔗
Torch operations.
TorchMixin 🔗
Mixin providing Torch operations for a Session
.
This mixin is intended to be used in combination with BaseSession
and should not be instantiated on its own.
Intended usage
class Session(BaseSession, TorchMixin): ...
torch_jitload_forward 🔗
torch_jitload_forward(
resource: Resource,
in_tensors: list[Tensor],
nr_out_tensors: int = 1,
run_options: Buffer | None = None,
) -> list[Tensor]
Performs the Torch jitload forward operation.
Wraps the vaccel_torch_jitload_forward()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| Resource | A resource with the model to run. | required |
| list[Tensor] | The input tensors for the inference. | required |
| int | The number of output tensors. Defaults to 1. | 1 |
| Buffer | None | The inference options. | None |
Returns:
Type | Description |
---|---|
list[Tensor] | The output tensors |
Raises:
Type | Description |
---|---|
FFIError | If the C operation fails. |