Skip to content

Class IModelInstanceInterface

Class IModelInstanceInterface

  • Defined in File NNEWrappers.h
class IModelInstanceInterface

Source: 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

SymbolDetails
~IModelInstanceInterface
GetInputTensorDescsGets the input tensor descriptors for the model.
SetInputTensorShapesSets the input tensor shapes for the model.
RunSyncRuns synchronous inference on the model.

~IModelInstanceInterface

virtual ~IModelInstanceInterface() = default

Attributes: virtual

Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h

GetInputTensorDescs

virtual TConstArrayView<UE::NNE::FTensorDesc> GetInputTensorDescs() = 0

Gets 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::EResultStatus
SetInputTensorShapes(TConstArrayView<UE::NNE::FTensorShape> InInputShapes) = 0

Sets the input tensor shapes for the model.

Parameters

InInputShapes – [in] Array of tensor shapes to set

Returns:

Status indicating success or failure

#DirectionNameTypeDescription
1InInputShapesTConstArrayView< UE::NNE::FTensorShape >Array of tensor shapes to set

Attributes: pure virtual

Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h

RunSync

virtual UE::NNE::EResultStatus
RunSync(TConstArrayView<FTensorBindingCPU> InInputBindings,
TConstArrayView<FTensorBindingCPU> InOutputBinding) = 0

Runs 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

#DirectionNameTypeDescription
1InInputBindingsTConstArrayView< FTensorBindingCPU >Input tensor bindings containing the input data
2InOutputBindingTConstArrayView< FTensorBindingCPU >Output tensor bindings to receive the results

Attributes: pure virtual

Source: Source/Schola/NNE/Public/NNEUtils/NNEWrappers.h