class TensorflowLite::Client
- TensorflowLite::Client
- Reference
- Object
Overview
provides a simplified way to load and manipulate the tensorflow interpreter
the indexable module provides simplified access to the input tensors
Included Modules
- Indexable(TensorflowLite::Tensor)
Defined in:
tensorflow_lite/client.crConstructors
-
.new(model : URI | Bytes | Path | Model | String, delegate : Delegate | Nil = nil, threads : Int | Nil = nil, labels : URI | Array(String) | Nil = nil)
Configures the tensorflow interpreter with the options provided
-
.new(model : URI | Bytes | Path | Model | String, delegate : Delegate | Nil = nil, threads : Int | Nil = nil, labels : URI | Array(String) | Nil = nil, &on_error : String -> Nil)
Configures the tensorflow interpreter with the options provided
Instance Method Summary
-
#input_tensor(*args, **options)
input tensor details for manipulation and loading of input data
-
#input_tensor(*args, **options, &)
input tensor details for manipulation and loading of input data
-
#input_tensor_count(*args, **options)
input tensor details for manipulation and loading of input data
-
#input_tensor_count(*args, **options, &)
input tensor details for manipulation and loading of input data
- #interpreter : Interpreter
-
#invoke(*args, **options)
run the model, processing the input tensors and updating the output tensors
-
#invoke(*args, **options, &)
run the model, processing the input tensors and updating the output tensors
-
#invoke!(*args, **options)
run the model, processing the input tensors and updating the output tensors
-
#invoke!(*args, **options, &)
run the model, processing the input tensors and updating the output tensors
-
#labels
attempt to extract any labels in the model
- #labels_fetched : Bool
- #model : Model
- #model_path : Path | Nil
-
#num_threads(*args, **options)
This controls the number of CPU threads that the interpreter will use for its computations.
-
#num_threads(*args, **options, &)
This controls the number of CPU threads that the interpreter will use for its computations.
-
#on_error(&callback : String -> Nil)
provide a callback to receive any error messages
- #options : InterpreterOptions
-
#output(index : Int = 0)
returns the output tensor at the provided index
-
#output_tensor(*args, **options)
output tensors details, used to obtain the results of an invokation
-
#output_tensor(*args, **options, &)
output tensors details, used to obtain the results of an invokation
-
#output_tensor_count(*args, **options)
output tensors details, used to obtain the results of an invokation
-
#output_tensor_count(*args, **options, &)
output tensors details, used to obtain the results of an invokation
-
#outputs
returns an array of output tensors
-
#size
the number of input tensors
Constructor Detail
Configures the tensorflow interpreter with the options provided
Configures the tensorflow interpreter with the options provided
Instance Method Detail
input tensor details for manipulation and loading of input data
input tensor details for manipulation and loading of input data
input tensor details for manipulation and loading of input data
input tensor details for manipulation and loading of input data
run the model, processing the input tensors and updating the output tensors
run the model, processing the input tensors and updating the output tensors
run the model, processing the input tensors and updating the output tensors
run the model, processing the input tensors and updating the output tensors
This controls the number of CPU threads that the interpreter will use for its computations.
This controls the number of CPU threads that the interpreter will use for its computations.
output tensors details, used to obtain the results of an invokation
output tensors details, used to obtain the results of an invokation
output tensors details, used to obtain the results of an invokation
output tensors details, used to obtain the results of an invokation