View Source tflite_beam_flatbuffer_model (tflite_beam v0.3.2)
Link to this section Summary
Functions
Build model from a given .tflite file
Build model from a given .tflite file
Returns the minimum runtime version from the flatbuffer. This runtime version encodes the minimum required interpreter version to run the flatbuffer model. If the minimum version can't be determined, an empty string will be returned.
Return model metadata as a mapping of name and buffer strings.
Verifies whether the content of the file is legit, then builds a model based on the file.
Link to this section Functions
-spec build_from_buffer(binary()) -> #tflite_beam_flatbuffer_model{} | {error, binary()}.
-spec build_from_buffer(binary(), list()) -> #tflite_beam_flatbuffer_model{} | {error, binary()}.
-spec build_from_file(list() | binary()) -> #tflite_beam_flatbuffer_model{} | {error, binary()}.
Build model from a given .tflite file
Positional Parameters
-spec build_from_file(list() | binary(), list()) -> #tflite_beam_flatbuffer_model{} | {error, binary()}.
Build model from a given .tflite file
Positional Parameters
-spec error_reporter(#tflite_beam_flatbuffer_model{} | reference()) ->
#tflite_beam_error_reporter{} | {error, binary()}.
-spec get_associated_file(binary(), [binary()] | binary()) -> map() | binary() | {error, binary()}.
-spec get_minimum_runtime(#tflite_beam_flatbuffer_model{} | reference()) -> binary() | {error, binary()}.
Returns the minimum runtime version from the flatbuffer. This runtime version encodes the minimum required interpreter version to run the flatbuffer model. If the minimum version can't be determined, an empty string will be returned.
Note that the returned minimum version is a lower-bound but not a strict lower-bound; ops in the graph may not have an associated runtime version, in which case the actual required runtime might be greater than the reported minimum.-spec initialized(#tflite_beam_flatbuffer_model{} | reference()) -> boolean() | {error, binary()}.
-spec list_associated_files(binary()) -> [binary()] | {error, binary()}.
-spec read_all_metadata(#tflite_beam_flatbuffer_model{} | reference()) -> map() | {error, binary()}.
Return model metadata as a mapping of name and buffer strings.
See Metadata table in TFLite schema.-spec verify_and_build_from_file(list() | binary()) ->
#tflite_beam_flatbuffer_model{} | {error, binary()}.
Verifies whether the content of the file is legit, then builds a model based on the file.
Positional Parameters
-spec verify_and_build_from_file(list() | binary(), list()) ->
#tflite_beam_flatbuffer_model{} | invalid | {error, binary()}.