alibaba / MNN

MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba
http://www.mnn.zone/
8.72k stars 1.67k forks source link

Inference of quantized model on python #2218

Closed lukseny closed 9 months ago

lukseny commented 1 year ago

Hi everyone! I've faced the following problem: after quantization I can't run model inference on python correctly. The logs are 'recover int8 weights error'. What can be the issue here and how to deal with it? (before quantization mnn model runs perfectly) I'm using MNN library ''' interpreter = MNN.Interpreter(args.model_path) session = interpreter.createSession() input_tensor = interpreter.getSessionInput(session) ... tmp_input = MNN.Tensor((1, 3, input_size[1], input_size[0]), MNN.Halide_Type_Float, image, MNN.Tensor_DimensionType_Caffe) input_tensor.copyFrom(tmp_input) interpreter.runSession(session) scores = interpreter.getSessionOutput(session, "scores").getData() boxes = interpreter.getSessionOutput(session, "boxes").getData() '''

wangzhaode commented 1 year ago

can you provide the quantization model ?

yyfcc17 commented 1 year ago

use latest code & latest pymnn

github-actions[bot] commented 9 months ago

Marking as stale. No activity in 60 days.