Skip to content

完成ppq量化后,生成engine文件时报错 #580

@Erzhuzi777

Description

@Erzhuzi777

在使用ppq将yolo模型量化至TRT_INT8后,使用build_engine代码出现以下报错
[11/01/2024-01:16:39] [TRT] [E] 4: [graphShapeAnalyzer.cpp::processCheck::862] Error Code 4: Internal Error (/TopK: K exceeds the maximum value allowed (3840).)
Traceback (most recent call last):
File "Erzhuzi/PPQ_work/yolox_s/Generate.py", line 56, in
build_engine(onnx_file='Erzhuzi/PPQ_work/yolov8/model_modified.onnx', int8_scale_file='Erzhuzi/PPQ_work/yolov8/quant_cfg.json', engine_file='Erzhuzi/PPQ_work/yolov8/Quantized.engine', int8=True)
File "/usr/local/lib/python3.8/dist-packages/ppq/utils/TensorRTUtil.py", line 263, in build_engine
f.write(engine.serialize())
AttributeError: 'NoneType' object has no attribute 'serialize'
始终无法解决这个topk的问题,求大佬解答

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions