View Source TFLiteElixir.InterpreterBuilder (tflite_elixir v0.1.3)

Link to this section Summary

Functions

Build the interpreter with the InterpreterBuilder.

Raising version of build/2.

New InterpreterBuilder

Raising version of new/2.

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

Link to this section Types

@type nif_error() :: {:error, String.t()}
@type nif_resource_ok() :: {:ok, reference()}

Link to this section Functions

Link to this function

build(self, interpreter)

View Source
@spec build(reference(), reference()) :: :ok | nif_error()

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.

Link to this function

build!(self, interpreter)

View Source

Raising version of build/2.

Link to this function

new(flat_buffer_model, resolver)

View Source
@spec new(%TFLiteElixir.FlatBufferModel{model: term()}, reference()) ::
  nif_resource_ok() | nif_error()

New InterpreterBuilder

Raising version of new/2.

Link to this function

setNumThreads(self, num_threads)

View Source
@spec setNumThreads(reference(), integer()) :: :ok | nif_error()

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

Link to this function

setNumThreads!(self, num_threads)

View Source

Raising version of setNumThreads/2.