Closed TheOnlyoe closed 1 year ago
顺序错了
顺序错了
我尝试将这两句移到前面,但是最终的结果似乎并没有改变
# compile_options
compile_options = nncase.CompileOptions()
compile_options.target = target
compile_options.input_type = 'float32'
compile_options.input_layout = 'NHWC'
compile_options.output_layout = 'NHWC'
compile_options.dump_ir = True
compile_options.dump_asm = True
compile_options.dump_dir = 'tmp'
# quantize model
compile_options.quant_type = 'int16' # or 'int8' 'int16'
compile_options.w_quant_type = 'int16' # or 'int8' 'int16'
# compiler
compiler = nncase.Compiler(compile_options)
# import_options
import_options = nncase.ImportOptions()
@TheOnlyoe k210只支持uint8量化
问题 使用例程中的“编译uint8量化tflite模型”,模型使用的样例中的‘examples/20classes_yolo/model/20classes_yolo.tflite’,修改量化类型为int16,输出模型大小无任何变化,Netron查看ir_target_dep_after_quant下的pb文件,卷积核等各项参数仍然是uint8类型 compile_options.quant_type = 'int16' # or 'int8' 'int16' compile_options.w_quant_type = 'int16' # or 'int8' 'int16'
To Reproduce 使用的转换代码
转换出来的结果
Expected behavior 将量化类型更改为int16
Origin model and code If applicable, add orgin model and code to help explain your problem.
Environment (please complete the following information):