Contents

executeFunction(_:arguments:)

Executes the specified function using an array of input and output tensors.

Declaration

func executeFunction(_ function: String? = nil, arguments: inout [BNNSTensor]) async throws

Parameters

  • function:

    The function. Specify as nil if the graph only contains one function.

  • arguments:

    The output and input arguments. Note that the arguments may not be in the same order as the original mlpackage or mlmodelc file. Use the Argumentposition(forfunction:argument:) function to get the correct position in the arguments array for a given argument.

See Also

Executing a graph