tflite로 변환시 unit8로 양자화 하면
분명 범위는 random으로 들어가야 해서 quantization 범위가 조금은 달라질 것으로 예상을 했는데
항상 동일한 0.003921568859368563 * q로 나와 해당 숫자로 검색을 하니
0~255 범위를 float로 정규화 하면 해당 숫자가 나온다고..
0.00392 * 255 = 0.9996 이 나오긴 하네?
quantization of input tensor will be close to (0.003921568859368563, 0). mean is the integer value from 0 to 255 that maps to floating point 0.0f. std_dev is 255 / (float_max - float_min). This will fix one possible problem |
[링크 : https://stackoverflow.com/questions/54830869/]
[링크 : https://github.com/majidghafouri/Object-Recognition-tf-lite/issues/1]
+
output_format: Output file format. Currently must be {TFLITE, GRAPHVIZ_DOT}. (default TFLITE) quantized_input_stats: Dict of strings representing input tensor names mapped to tuple of floats representing the mean and standard deviation of the training data (e.g., {"foo" : (0., 1.)}). Only need if inference_input_type is QUANTIZED_UINT8. real_input_value = (quantized_input_value - mean_value) / std_dev_value. (default {}) default_ranges_stats: Tuple of integers representing (min, max) range values for all arrays without a specified range. Intended for experimenting with quantization via "dummy quantization". (default None) post_training_quantize: Boolean indicating whether to quantize the weights of the converted float model. Model size will be reduced and there will be latency improvements (at the cost of accuracy). (default False) |
[링크 : http://man.hubwiz.com/.../python/tf/lite/TFLiteConverter.html]
TOCO(Tensorflow Lite Optimized Converter)
[링크 : https://junimnjw.github.io/%EA%B0%9C%EB%B0%9C/2019/08/09/tensorflow-lite-2.html]
'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글
tflite convert (0) | 2021.04.16 |
---|---|
LSTM - Long short-term memory (0) | 2021.04.16 |
tflite_converter quantization (0) | 2021.04.14 |
tensorboard graph (0) | 2021.04.14 |
generate_tfrecord.py (0) | 2021.04.13 |