View Source tflite_beam_tensor (tflite_beam v0.3.8)
A typed multi-dimensional array used in Tensorflow Lite.
Summary
Functions
Get the dimensions (C++) API
Get the quantization params
Set tensor data
Get the tensor shape
Get binary data
Get binary data
Get the data type
Types
Functions
-spec dims(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference()) -> [integer()] | {error, binary()}.
Get the dimensions (C++) API
-spec quantization_params(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference()) -> #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()} | {error, binary()}.
Get the quantization params
-spec set_data(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference(), binary()) -> ok | {error, binary()}.
Set tensor data
-spec shape(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference()) -> tuple() | {error, binary()}.
Get the tensor shape
-spec to_binary(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference()) -> binary() | {error, binary()}.
Get binary data
-spec to_binary(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference(), non_neg_integer()) -> binary() | {error, binary()}.
Get binary data
-spec type(#tflite_beam_tensor{name :: binary(), index :: non_neg_integer(), shape :: tuple(), shape_signature :: list(), type :: tflite_beam_tensor_type(), quantization_params :: #tflite_beam_quantization_params{scale :: term(), zero_point :: term(), quantized_dimension :: term()}, sparsity_params :: term(), ref :: reference()} | reference()) -> tflite_beam_tensor_type() | {error, binary()}.
Get the data type