TFLite ?
Tensorflow Lite(TFLite)는 mobile, embedding, loT device에서 모델을 사용할 수 있도록 Tensorflow(keras)모델을 변환해주는 tool
Tensorflow Lite Compile -> Convert
Model Compile
converter = tf.lite.TFLiteConverter.from_keras_model('your keras model')
Attributes
- representative_dataset : quantization할 때 필요한 데이터셋 ..?
- target_spec : [float32, float16, int8] 중에 어떤 data type(bit)으로 표현되는 모델을 출력할지 정함
- inference_input_type : input layer의 data type
- inference_output_type : output layer의 data type
Model Convert
tflite_model = converter.convert()
TensorFlow Lite 공식문서