I tried to apply global pruning over my model which is having one lstm layer.  I am getting
UserWarning: 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().
then i put flatten_parameters in forward of the module. But getting the same. Can u plz help