专栏算法工具链function is not implemented for QTensor.

function is not implemented for QTensor.

已解决
默认232322025-03-04
67
4

RuntimeError: function  built-in method arctan of type object at 0x794dd5681760  is not implemented for QTensor. Please check whether has unsupported ops in the model   

 

arctan 函数不支持 qtensor ,是把这个op 移出量化 q- dq stub 范围之外吗 ? 

算法工具链
征程6技术深度解析
评论1
0/1000
  • Huanghui
    Lv.5

    你好。pytorch里面并没有torch.arctan这个API ,但是有torch.atan,包括onnx里面也没有这个arctan的api,有Atan算子。你可以把你的模型里面涉及到的arctan替换成pytorch的torch.atan,重新导出onnx,或者直接修改onnx模型文件蒋arctan修改成Atan算子,这样是等效的。

    2025-03-04
    0
    3
    • 默认23232回复Huanghui:
      2025-03-05
      0
    • Huanghui回复默认23232:

      好的那我可能是记错了

      2025-03-05
      0
    • Huanghui回复默认23232:

      对的他们两个是等效的替换下就ok

      2025-03-05
      0