Hi,
no. torch.nn.Module and torch::nn::Module are completely independent. While we aim for parity between the APIs, you cannot convert from one to another.
The deeper reason is that it would give up quite bit of “Pythonic” to move the modular interface into C++.
So indeed, I think JIT might be the only way to use the same module on both sides of C++ / Python (unless you want to call back into Python from C++).
Best regards
Thomas