How to serialize torch::nn::Module to buffer?

How to serialize torch::nn::Module to buffer ?