Interpreter
public final class Interpreter
A TensorFlow Lite interpreter that performs inference from a given model.
-
The configuration options for the
Interpreter
.Declaration
Swift
public let options: Options?
-
The total number of input
Tensor
s associated with the model.Declaration
Swift
public var inputTensorCount: Int { get }
-
The total number of output
Tensor
s associated with the model.Declaration
Swift
public var outputTensorCount: Int { get }
-
Creates a new instance with the given values.
Throws
An error if the model could not be loaded or the interpreter could not be created.Declaration
Parameters
modelPath
The local file path to a TensorFlow Lite model.
options
Configurations for the
Interpreter
. The default isnil
indicating that theInterpreter
will determine the configuration options.