if you want to collect the output feature maps, collect their .data attributes. Remember that a Variable is not just it’s .data Tensor, but also all the history it’s holding onto (i.e. how it was created, what buffers it needs to compute gradients correctly, etc.).
I think every epoch when you yield and collect these params, it’s holding on to much more than just the output activations for this reason.