aimet icon indicating copy to clipboard operation
aimet copied to clipboard

Is prepare_model mandatory to use?

Open CangHaiQingYue opened this issue 11 months ago • 1 comments

Hi, I’m trying to apply AIMET on YOLO v5. I found that after using ‘prepare_model’ , during the forward phase of fine-tune, the input image will not follow the model's forward function(https://github.com/ultralytics/yolov5/blob/956be8e642b5c10af4a1533e09084ca32ff4f21f/models/yolo.py#L126), which can lead to other errors.

And another question is when I set "per_channel_quantization":"True" in QuantizationSimModel's config, It means both activation and params are in per_channel model, or just params in per_channel model.

CangHaiQingYue avatar Mar 11 '24 02:03 CangHaiQingYue

Hello @CangHaiQingYue

model preparer is highly recommended in aimet, you can find here some more info on this API. Didn't get the issue you are facing, but probably partial could help you to freeze some arguments before the forward.

The per_channel_quantization is for params

Regards, Saïd

e-said avatar Mar 15 '24 14:03 e-said