专栏算法工具链QAT量化模型检查阶段报错

QAT量化模型检查阶段报错

已解决
默认383362025-05-22
60
10
您好,我用1.1.77版本的oe包,用QAT量化faster rcnn模型。在模型检查阶段遇到了和https://developer.horizon.auto/forum/12793类似的问题,除了oe包版本外还可能是什么原因导致的?
算法工具链
征程5
评论2
0/1000
  • 费小财
    Lv.5

    可能还是版本问题,你试过更新版本吗

    2025-05-23
    0
    2
    • 默认38336回复费小财:

      我之前用的是1.1.68版本的oe包,参考这个https://developer.horizon.auto/forum/12793,换成了1.1.77的,都出现了这个问题

      2025-05-23
      0
    • 默认38336回复费小财:

      除了gpu docker版本外还有什么需要更新么

      2025-05-23
      0
  • Huanghui
    Lv.5

    你好,从日志中可以看出replace_function_with_module_torch_horizon_nn_op_mapping[op_name]中的 op_name的值吗?

    2025-05-23
    0
    6
    • 默认38336回复Huanghui:

      softmax

      2025-05-23
      0
    • Huanghui回复默认38336:

      了解,我check一下,另外,你可以把模型中使用softmax部分的代码片段分享一下不?

      2025-05-23
      0
    • 默认38336回复Huanghui:
      2025-05-23
      0
    • Huanghui回复默认38336:

      把F.softmax替换成nn.Softmax试试呢, 定义一个softmax层self.softmax = nn.Softmax(dim=-1).然后在forward中调用 rpn_softmax_scores = self.softmax( rpn_scores)

      2025-05-23
      0
    • 默认38336回复Huanghui:

      恩可以了,谢谢。但又出现了AssertionError: max_pool2d with return_indices true is not supported,我代码中只定义了self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0, ceil_mode=True),并未指定return_indices,不知道是不是和torchvision.ops 的RoIPool的使用有关?

      2025-05-23
      0
    • 默认38336回复Huanghui:

      工具链哪有faster rcnn的量化示例吗?我搜索发现Horizon Tensorflow Plugin里面有,但不知道在哪下载(https://developer.horizon.auto/blog/10464)

      2025-05-23
      0