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

RNN support for ONNX-Chainer #13

Open
sw005320 opened this issue Jan 19, 2018 · 2 comments
Open

RNN support for ONNX-Chainer #13

sw005320 opened this issue Jan 19, 2018 · 2 comments

Comments

@sw005320
Copy link

I just raised it, as we intensively use RNN (LSTM) for attention-based end-to-end ASR https://github.com/espnet/espnet with chainer and pytorch as a backend, and want to unify these two backends with the ONNX framework to some extent. I really appreciate if you answer when and how it is supported.

@mitmul
Copy link
Member

mitmul commented Jan 31, 2018

It's still in an exploratory stage to find a good way to identify an LSTM block from a computational graph dynamically generated. In current Chainer, an LSTM function consists of several Linear functions and activation functions, and it appears as a series of those functions in the resulting computational graph. So, we need to annotate the LSTM part during a forward pass computation, but there's no way to do that now. On the other hand, current ONNX requires the batchsize and the sequence length at the same time to describe a single LSTM operator, but both may change in actual inference programs, so I think the current ONNX is not enough to represent RNN. But we also want to support RNN export into ONNX, so we will continue to try to find a good way. If you have any ideas, we welcome your suggestions of solutions on those problems.

@sw005320
Copy link
Author

sw005320 commented Feb 1, 2018

I see the point. I'm sorry that I don't have a nice solution about it right now, but will let you know once I come up with something. Thanks for your answer.

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

2 participants