onnx适配出错
收藏回复举报
onnx适配出错
t('forum.solved') 已解决
发表于2024-07-02 17:06:47
0 查看

我按照例程已经通过msame跑通一遍了,对于教程里的leaky_relu_custom的讲解没有理解,该算子的调用形式没找到。

我理解的应该是把x + self.cv2(self.cv1(x)) 变为

             torch_npu.npu_add_custom(x.npu(), self.cv2(self.cv1(x)).npu()).cpu()

请求解答?

还有我的算子包已经部署好了,经测试部署是没有问题的,我在先前的帖子里也有说明。但是在转为onnx的过程中会报错:torch.onnx.errors.UnsupportedOperatorError: ONNX export failed on an operator with unrecognized namespace npu::npu_add_custom. If you are trying to export a custom operator, make sure you registered it with the right domain and version.要怎么解决这个问题

我要发帖子