# How do I disable libtorch warning

Recently I deployed a program using libtorch (PyTorch C++ API). The program run as expected but its gives me a warning.

Warning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greatly increasing memory usage. To compact weights again call flatten_parameters().


How do I disable the warning ?

• Naive solution, but why not fix the warning by actually calling flatten_parameters? You'd save on memory, right? Dec 9, 2019 at 8:19
• coz the problem is not solved yet github.com/pytorch/pytorch/issues/19053 Dec 9, 2019 at 9:03