executeFunction(_:arguments:)
Synchronously executes the specified function with the provided context.
Declaration
func executeFunction(_ function: String? = nil, arguments: inout [BNNSTensor]) throwsParameters
- function:
The specific function to execute. You may set this to
nilif there is only one function. - arguments:
The output and input arguments.
Discussion
If the underlying model contains dynamic shaped inputs or outputs, these must be set prior to calling this routine through a call to either setDynamicShapes(_:forFunction:) or setBatchSize(_:forFunction:). Don’t modify the shapes again until this routine has returned.
The same context must only be used by a single thread at a time.