class TensorflowLite::Interpreter
- TensorflowLite::Interpreter
- Reference
- Object
Overview
The Interpreter takes a model, loads it, and allows you to run (or "interpret") the model, i.e., to use it to make predictions based on input data.
Defined in:
tensorflow_lite/interpreter.crConstructors
-
.new(model : Model, options : InterpreterOptions)
provide the model and options required for inference
Instance Method Summary
-
#input_tensor(index : Int) : Tensor
returns the requested input tensor for manipulation and loading of input data
-
#input_tensor_count : Int32
the number of input tensors that are used to feed data into the model
-
#inspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
-
#invoke : Status
runs the model and returns the result status
-
#invoke!
run the model, processing the input tensors and updating the output tensors
-
#model : Model
the model this interpreter is running
-
#options : InterpreterOptions
the options used to initialize this interpreter
-
#output_tensor(index : Int) : Tensor
returns the requested output tensor for results extraction
-
#output_tensor_count : Int32
the number of output tensors, used to obtain the results of an invokation
Constructor Detail
provide the model and options required for inference
Instance Method Detail
returns the requested input tensor for manipulation and loading of input data
the number of input tensors that are used to feed data into the model
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
runs the model and returns the result status
NOTE the results are stored in the output tensors
returns the requested output tensor for results extraction
the number of output tensors, used to obtain the results of an invokation