InferRequest¶
Interface InferRequest
interface InferRequest {
getCompiledModel(): CompiledModel;
getInputTensor(idx?): Tensor;
getOutputTensor(idx?): Tensor;
getTensor(nameOrOutput): Tensor;
infer(inputData?): {
[outputName: string]: Tensor;
};
inferAsync(inputData): Promise<{
[outputName: string]: Tensor;
}>;
setInputTensor(idxOrTensor, tensor?): void;
setOutputTensor(idxOrTensor, tensor?): void;
setTensor(name, tensor): void;
}
Defined in addon.ts:72
Methods¶
getCompiledModel
getCompiledModel(): CompiledModel
Returns CompiledModel
Defined in addon.ts:83
getInputTensor
getInputTensor(idx?): Tensor
Parameters
Optional
idx: number
Returns Tensor
Defined in addon.ts:77
getOutputTensor
getOutputTensor(idx?): Tensor
Parameters
Optional
idx: number
Returns Tensor
Defined in addon.ts:78
getTensor
getTensor(nameOrOutput): Tensor
Parameters
nameOrOutput: string| Output
Returns Tensor
Defined in addon.ts:76
infer
infer(inputData?): {
[outputName: string]: Tensor;
}
Parameters
Optional
inputData: { [inputName: string]: Tensor | SupportedTypedArray; } | Tensor[] | SupportedTypedArray[]
Returns
{
[outputName: string]: Tensor;
}
[outputName: string]: Tensor
Defined in addon.ts:79
inferAsync
inferAsync(inputData): Promise<{
[outputName: string]: Tensor;
}>
Parameters
inputData: Tensor[] | { [inputName: string]: Tensor; }
Returns
Promise<{
[outputName: string]: Tensor;
}>
Defined in addon.ts:81
setInputTensor
setInputTensor(idxOrTensor, tensor?): void
Parameters
idxOrTensor: number| Tensor
Optional
tensor: Tensor
Returns void
Defined in addon.ts:74
setOutputTensor
setOutputTensor(idxOrTensor, tensor?): void
Parameters
idxOrTensor: number| Tensor
Optional
tensor: Tensor
Returns void
Defined in addon.ts:75
setTensor
setTensor(name, tensor): void
Parameters
name: string
tensor: Tensor
Returns void
Defined in addon.ts:73