infer
Function Usage
Performs model inference by inputting multiple tensor objects.
Prototype
Prototype 1:
1 | infer(tensor: Tensor, args) |
Prototype 2:
infer(tensorList: List)
Input Parameters
Prototype 1:
Parameter |
Type |
Description |
|---|---|---|
tensor |
Tensor object |
Tensor required for model inference. If you need to input multiple tensors, separate them with commas (,). A maximum of 1024 tensors can be input. |
args |
Variable parameter |
Prototype 2:
Parameter |
Type |
Description |
|---|---|---|
tensorList |
List[base.Tensor] |
Tensor list |
Response Parameters
List[base.Tensor] output by the model inference
Exception Throwing Interface
If parameter verification, tensor memory allocation, and inference fail, a runtime exception is thrown.
Parent topic: Model