BB.Inference.TFLite.TinyTFLite (bb_inference_tflite v0.1.0)

Copy Markdown View Source

Writes tiny TensorFlow Lite models, encoded by hand, so the tests need neither a downloaded artefact nor a Python toolchain.

  • float/1: one f32 input x of shape {1, 3}, and two outputs in this order: doubled (x + x) and squared (x * x).
  • quantised/1: one u8 input x of shape {1, 3} (scale 0.5, zero point 10) and one u8 output doubled (scale 1.0, zero point 20).

Field numbers are from TensorFlow Lite's schema.fbs. The flatbuffer is laid out front to back: every table is preceded by its vtable, and everything a table refers to comes after it.

Summary

Functions

Write the float model to path.

Write the quantised model to path.

Functions

float(path)

@spec float(Path.t()) :: Path.t()

Write the float model to path.

quantised(path)

@spec quantised(Path.t()) :: Path.t()

Write the quantised model to path.