Hello. I scripted by torch.jit.export function init_state() but can’t use it in c++ code.
Example:
class my_class(torch.nn.Module):
def forward …
@torch.jit.export
def init_state():
       pass

a = torch.jit.script(my_class)
a.init_state().  #is working
a.save(‘test.pt’)
In c++:
auto b =torch:jit:load(“test.pt”);
b.init_state(); //error
‘Struct torch:jit:Module’ has no member "init-state’’
Please help me use init_state in c++.