Models

spokestack.models.tensorflow module

TFLite model base class

class spokestack.models.tensorflow.TFLiteModel(model_path, **kwargs)[source]

TFLite model base class for managing multiple inputs/outputs

Parameters
property input_details

Property for accesing the TFLite model input_details

Returns: Input details for the TFLite model

Return type

List[Any]

property output_details

Property for accesing the TFLite model output_details

Returns: Output details for the TFLite model

Return type

List[Any]

resize(index, shape)[source]

Resize and allocate an input tensor

Parameters
  • index (int) – index of the input tensor to resize

  • shape (List[int]) – new shape of the input tensor

Return type

None