View Source tflite_beam_interpreter_builder (tflite_beam v0.3.8)

Build an interpreter capable of interpreting model.

Summary

Functions

Build the interpreter with the InterpreterBuilder.

Sets the number of CPU threads to use for the interpreter. Returns true on success, {error, reason} on error.

Functions

build(Builder, Interpreter)

-spec build(reference(), reference()) -> ok | {error, binary}.

Build the interpreter with the InterpreterBuilder.

Note: all Interpreters should be built with the InterpreterBuilder, which allocates memory for the Interpreter and does various set up tasks so that the Interpreter can read the provided model.

new(Tflite_beam_flatbuffer_model, Resolver)

-spec new(#tflite_beam_flatbuffer_model{initialized :: boolean(),
                                        minimum_runtime :: binary(),
                                        ref :: reference()} |
          reference(),
          reference()) ->
             {ok, reference()} | {error, binary()}.

New InterpreterBuilder

set_num_threads(Builder, NumThreads)

-spec set_num_threads(reference(), pos_integer()) -> ok | {error, binary}.

Sets the number of CPU threads to use for the interpreter. Returns true on success, {error, reason} on error.