My model can run by using pytorch, but and "out of memory" error occurs after converting to libtorch moedel

My model can run by pytorch1.0.0 and cuda9, after converting to libtorch model, “out of memory” error occurred by using libtorch1.0.0 and cuda9. I use https://pytorch.org/tutorials/advanced/cpp_export.html to convert model

Can you post the code of your model for debugging?