Interface: ExecutorchModuleType
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:22
Return type for the useExecutorchModule hook.
Manages the state and core execution methods for a general ExecuTorch model.
Properties
downloadProgress
downloadProgress:
number
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:41
Represents the download progress of the model binary as a value between 0 and 1.
error
error:
RnExecutorchError|null
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:26
Contains the error object if the model failed to load, download, or encountered a runtime error.
forward()
forward: (
inputTensor) =>Promise<TensorPtr[]>
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:49
Executes the model's forward pass with the provided input tensors.
Parameters
inputTensor
An array of TensorPtr objects representing the input tensors required by the model.
Returns
Promise<TensorPtr[]>
A Promise that resolves to an array of output TensorPtr objects resulting from the model's inference.
Throws
If the model is not loaded or is currently processing another request.
isGenerating
isGenerating:
boolean
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:36
Indicates whether the model is currently processing a forward pass.
isReady
isReady:
boolean
Defined in: packages/react-native-executorch/src/types/executorchModule.ts:31
Indicates whether the ExecuTorch model binary has successfully loaded into memory and is ready for inference.