Class IModelInstanceInterface
Class IModelInstanceInterface
- Defined in File NNEWrappers.h
class IModelInstanceInterfaceSource: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h Generic interface for neural network model instances across different device types.
This interface provides a device-agnostic way to interact with NNE model instances, abstracting differences between CPU and GPU implementations.
Public Functions
| Symbol | Details |
|---|---|
~IModelInstanceInterface | — |
GetInputTensorDescs | Gets the input tensor descriptors for the model. |
SetInputTensorShapes | Sets the input tensor shapes for the model. |
RunSync | Runs synchronous inference on the model. |
~IModelInstanceInterface
virtual ~IModelInstanceInterface() = defaultAttributes: virtual
Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h
GetInputTensorDescs
virtual TConstArrayView<UE::NNE::FTensorDesc> GetInputTensorDescs() = 0Gets the input tensor descriptors for the model.
Returns:
Array view of input tensor descriptors
Attributes: pure virtual
Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h
SetInputTensorShapes
virtual UE::NNE::EResultStatusSetInputTensorShapes(TConstArrayView<UE::NNE::FTensorShape> InInputShapes) = 0Sets the input tensor shapes for the model.
Parameters
InInputShapes – [in] Array of tensor shapes to set
Returns:
Status indicating success or failure
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InInputShapes | TConstArrayView< UE::NNE::FTensorShape > | Array of tensor shapes to set |
Attributes: pure virtual
Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h
RunSync
virtual UE::NNE::EResultStatusRunSync(TConstArrayView<FTensorBindingCPU> InInputBindings, TConstArrayView<FTensorBindingCPU> InOutputBinding) = 0Runs synchronous inference on the model.
Parameters
-
InInputBindings – [in] Input tensor bindings containing the input data
-
InOutputBinding – [inout] Output tensor bindings to receive the results
Returns:
Status indicating success or failure
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InInputBindings | TConstArrayView< FTensorBindingCPU > | Input tensor bindings containing the input data |
| 2 | — | InOutputBinding | TConstArrayView< FTensorBindingCPU > | Output tensor bindings to receive the results |
Attributes: pure virtual