model.fit(train_features, train_weights, epochs=100, validation_split=0.2, verbose=0) converter = tf.lite.TFLiteConverter.from_keras_model(model) tflite_model = converter.convert() open('./models/model.tflite', "wb").write(tflite_model) model_size = os.path.getsize('./models/model.tflite') print("TFLite model is {} bytes".format(model_size)) converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE] tflite_quant_model = converter.convert() pip3 install https://dl.google.com/coral/python/tflite_runtime-2.1.0-cp37-cp37m-linux_armv7l.whl import tflite_runtime.interpreter as tflite interpreter = tflite.Interpreter(model_content=tflite_model_ffile) interpreter.allocate_tensors()