Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出onnx模型报错 #98

Closed
dengfenglai321 opened this issue Nov 13, 2020 · 5 comments
Closed

导出onnx模型报错 #98

dengfenglai321 opened this issue Nov 13, 2020 · 5 comments

Comments

@dengfenglai321
Copy link

大佬您好,我在导出onnx模型时有fail,没有成功导出onnx模型文件,如下:
UserWarning: ONNX export failed on threshold because non-zero threshold not supported
请问有办法解决吗

@SWHL
Copy link

SWHL commented Dec 13, 2020

@cendelian 我也遇到同样问题,请问你解决了吗

@TD-wzw
Copy link

TD-wzw commented Aug 19, 2021

@SWHL RuntimeError: ONNX export failed: Couldn't export operator aten::threshold
我是这样的错误请问大佬您解决了吗?

@SWHL
Copy link

SWHL commented Aug 19, 2021

@SWHL RuntimeError: ONNX export failed: Couldn't export operator aten::threshold
我是这样的错误请问大佬您解决了吗?

  def forward(self, x):
      x = (self.slope * x) + self.offset

      x = torch.clamp(-x, min=-1)
      x = torch.clamp(-x, min=0)
      return x

@TD-wzw
Copy link

TD-wzw commented Aug 19, 2021

@SWHL 运行时错误:ONNX 导出失败:无法导出操作符 aten::threshold
我是这样的错误请问各位大佬解决了吗?

  DEF 向前X):
       X  =自我斜率 *  X+ 自我偏移量

      x  = 火炬夹具( - x , min = - 1 )
       x  = 割炬钳位( - x , min = 0 )
      返回 x

感谢,转成功了,大佬你试过onnx-simplifier然后转ncnn吗?

@SWHL
Copy link

SWHL commented Aug 19, 2021

@SWHL 运行时错误:ONNX 导出失败:无法导出操作符 aten::threshold
我是这样的错误请问各位大佬解决了吗?

  DEF 向前X):
       X  =自我斜率 *  X+ 自我偏移量

      x  = 火炬夹具( - x , min = - 1 )
       x  = 割炬钳位( - x , min = 0 )
      返回 x

感谢,转成功了,大佬你试过onnx-simplifier然后转ncnn吗?

这个没有试过了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants