class Net(torch.jit.ScriptModule):
    def __init__(self):
        super(Net, self).__init__()
        self.conv = nn.Conv2d(1, 1, 3)

    @torch.jit.script_method
    def forward(self, x):
        return self.conv(x)

    @torch.jit.script_method
    def weighted_kernel_sum(self, weight):
        return weight * self.conv.weigh

n = Net()
n.save("model.pt")

What I want to say is that if I use this way to convert my model, can I call the weighted_kernel_sum method in the C++ code?