TorchEx icon indicating copy to clipboard operation
TorchEx copied to clipboard

can not export 'ingroup_indices' to torchscript

Open cyiano opened this issue 1 year ago • 3 comments

SST model relies on function 'IngroupIndicesFunction', which needs ingroup_indices op. But it is unable to export to torchscript. How can I fix it.

Error message: Could not export Python function call 'IngroupIndicesFunction'. Remove calls to Python functions before export. Did you forget to add @script or @script_method annotation? If this is a nn.ModuleList, add it to constants:

cyiano avatar Aug 02 '23 13:08 cyiano

Hi, I met the same error. How can you solve it?

rockywind avatar Aug 25 '23 02:08 rockywind

I have no experience with torchscript. However, it is a very simple op, so it should be easy to implement it in your way. @rockywind

Abyssaledge avatar Aug 25 '23 03:08 Abyssaledge

Thanks!

rockywind avatar Aug 25 '23 04:08 rockywind