MPolaris / onnx2tflite

Tool for onnx->keras or onnx->tflite. Hope this tool can help you.
Apache License 2.0
519 stars 41 forks source link

可以在转换的时候做fp16量化吗 #66

Closed dengwhao closed 3 months ago

dengwhao commented 4 months ago

好像没看到现在的代码有这个参数,int8精度损失太大了

MPolaris commented 4 months ago

目前你可以自行修改builder.py converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.target_spec.supported_types = [tf.float16]

MPolaris commented 4 months ago

你现在可以更新onnx2tflite,在转换的时候设置fp16_model=ture