Yolov7-e6e.pt 양자화 과정 오류

안녕하세요. 프로메디우스 김민준 연구원입니다.

학습이 완료된 yolov7-e6e.pt 을 양자화 진행할때,
yolov7의 furiosa_quantize.py의

ㅇef extract_model(model: onnx.ModelProto, input_name):
    """Cut off the post-processing components."""
    input_to_shape = [(input_name, (1, 3, *INPUT_SHAPE))]

    # TODO: The cut points below were chosen so that the postprocess() function can follow the
    # structure of the original PyTorch code as closely as possible. We need to experiment more with
    # different cut points to achieve the best combination of speed and accuracy.

    output_to_shape = (
        ("/model.105/m.0/Conv_output_0", (1, 255, 80, 80)),
        ("/model.105/m.1/Conv_output_0", (1, 255, 40, 40)),
        ("/model.105/m.2/Conv_output_0", (1, 255, 20, 20)),
    )
    output_to_shape = (
        (
            "/model.105/m.0/Conv_output_0",
            (1, 255, int(INPUT_SHAPE[0] / 8), int(INPUT_SHAPE[1] / 8)),
        ),
        (
            "/model.105/m.1/Conv_output_0",
            (1, 255, int(INPUT_SHAPE[0] / 16), int(INPUT_SHAPE[1] / 16)),
        ),
        (
            "/model.105/m.2/Conv_output_0",
            (1, 255, int(INPUT_SHAPE[0] / 32), int(INPUT_SHAPE[1] / 32)),
        ),

부분에서
KeyError: ‘/model.105/m.2/Conv_output_0’

위와 같은 오류가 발생합니다.
yolov7.pt 와 yolov7-e6e.pt 를 양자화 할때 모델의 layer가 달라서 바꾸어야 되는 코드를 제공해주실 수 있나요?

안녕하세요 FuriosaAI 정영범입니다.
yolov7-e6e도 yolov7과 동일한 위치를 자르면 됩니다. 다만 레이어의 이름이 바뀌어서 모델에서 확인하시고 해당 이름으로 변경하셔야합니다.
추가로 컴파일시에 instruction 메모리 크기에 한번에 들어오지않아, 컴파일시에 아래의 옵션을 주어야합니다. use_program_loading: True