How to convert torch::nn::Module to torch::jit::Module with forward

how to convert torch::nn::Module to torch::jit::Module with forward?
Using torch::nn::Module::save, not compile the forward to the scriptmodule, just the weights(buffers, parameters) and the net structure.

AttributeError: ‘RecursiveScriptModule’ object has no attribute ‘forward’