react-native-executorch
Version:
An easy way to run AI models in React Native with ExecuTorch
15 lines (14 loc) • 395 B
JavaScript
export class BaseNonStaticModule {
nativeModule = null;
async forwardET(inputTensor) {
return await this.nativeModule.forward(inputTensor);
}
async getInputShape(methodName, index) {
return this.nativeModule.getInputShape(methodName, index);
}
delete() {
if (this.nativeModule !== null) {
this.nativeModule.unload();
}
}
}