class TensorflowLite::Model

Overview

Models are a machine learning model that has been trained using TensorFlow and then converted into a format that is optimized for on-device use.

A TensorFlow Lite model typically has the file extension .tflite. The process of converting a regular TensorFlow model to this format often involves a few steps, such as "freezing" the model (converting all its variables to constants), and then applying optimizations like quantization to reduce the size of the model and improve its execution speed.

Defined in:

tensorflow_lite/model.cr

Constructors

Constructor Detail

def self.new(bytes : Bytes) #

use this to if the tflite model is already loaded into memory


[View source]
def self.new(path : Path) #

specify a path to load the tflite model from a file


[View source]