-
Notifications
You must be signed in to change notification settings - Fork 27
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
Torchscript support? #21
Comments
@StephenHogg Currently cplxmodule has ONNX support for compiling models in inference or training modes, and i agree When implementing the Now, it seems the |
torch.Tensor supports complex type now. Can't we just use that ? |
@pfeatherstone A user of I chose this design in order to build the module atop the existing framework, and it makes sense that batched basic linear algebra operations and convolutions could be faster when real and imaginary parts are kept as separate real-valued tensors (on CPU SIMD instructions use operate on reals in fp). At the same time torch supports complex-valued LAPACK functions (SVD, eingen, etc), which I envisioned the transition to |
hmm. I can see your point, at least if it is in fact true that |
I can see why you say that, I guess the question I originally asked was about torchscript support. My preference would absolutely to be to work with In any event I'm very grateful that you're both giving this consideration - if you just want to stick to onnx export only then I'm happy to just re-write the parts of the package I need using |
As an aside, I don't think pytorch complex tensors are ONNX-exportable at the moment. Even |
Hi Ivan,
Thanks so much for making this package, it's really well-developed. As things stand however, models created using it can't be converted to Torchscript. It may or may not be a problem to solve: please find attached an example of an error I got. It's noticeable that Torchscript is reasonably happy, there are just some functions that are defined with kwargs etc. Is there any chance you'd consider supporting this? It would be amazing to be able to use this in a compiled environment. I hope this isn't a bother.
Regards,
Stephen
cplxtest.txt - rename to cplxtest.ipynb
The text was updated successfully, but these errors were encountered: