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提示少OP including einsum,tril_triu, #919

Closed
sue2xlh opened this issue Sep 29, 2022 · 10 comments
Closed

转ONNX提示少OP including einsum,tril_triu, #919

sue2xlh opened this issue Sep 29, 2022 · 10 comments
Assignees

Comments

@sue2xlh
Copy link

sue2xlh commented Sep 29, 2022

您好,我在将模型转为ONNX格式的时候,报了以下问题:
image

我看了一下代码,可能是由于使用了paddle.einsum 和 paddle.tril的缘故。
在想有没有什么办法解决上面的报错?

@sue2xlh sue2xlh changed the title Oops, there are some operators not supported yet, including einsum,tril_triu, 转ONNX提示少OP including einsum,tril_triu, Sep 29, 2022
@yeliang2258
Copy link
Collaborator

paddle2onnx应该是没有支持这两个OP,您看看有没有办法用其他更常用的OP来组合实现这两个OP的功能。
这个后面我们会排期支持,但是这个周期要长一些。

@yeliang2258 yeliang2258 self-assigned this Sep 29, 2022
@sue2xlh
Copy link
Author

sue2xlh commented Sep 29, 2022

嗯嗯,好滴,谢谢答复。

@sue2xlh
Copy link
Author

sue2xlh commented Sep 29, 2022

不好意思,又打扰了,tril 这个怎么能用其他常用OP组合替代呢?比如这个 paddle.tensor.tril(paddle.ones_like(logits), diagonal=-1) 。想了很久,没有想到合适的组合。想请教一下您,有什么合适的组合推荐吗

@yeliang2258
Copy link
Collaborator

yeliang2258 commented Sep 30, 2022

你看看可以先用numpy生成这个矩阵,然后使用paddle.to_tensor直接转为paddle的tensor吗?

@sue2xlh
Copy link
Author

sue2xlh commented Oct 8, 2022

paddle2onnx的过程中, logits的类型是 <class 'paddle.fluid.framework.Variable'>, paddle.to_tensor(np.tril(paddle.ones_like(logits).numpy(), k=-1)) 我这样写 会报错

@GUSHUMING
Copy link

paddle2onnx的过程中, logits的类型是 <class 'paddle.fluid.framework.Variable'>, paddle.to_tensor(np.tril(paddle.ones_like(logits).numpy(), k=-1)) 我这样写 会报错

请问解决了吗

@sue2xlh
Copy link
Author

sue2xlh commented Dec 7, 2022

paddle2onnx的过程中, logits的类型是 <class 'paddle.fluid.framework.Variable'>, paddle.to_tensor(np.tril(paddle.ones_like(logits).numpy(), k=-1)) 我这样写 会报错

请问解决了吗

没解决,换成用pytorch了

@Vivecccccc
Copy link

是uie 吗?我也遇到了完全相同的算子不支持

@Zheng-Bicheng
Copy link
Collaborator

@Zheng-Bicheng
Copy link
Collaborator

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

No branches or pull requests

6 participants