Hi,
I haven't found any documentation on how the swap_memory parameter for tf.while_loop works or should be used.
My understanding is that the intermediate values of the loop get saved and this parameter allows you to swap these intermediate values off the GPU and onto the CPU to preserve memory.
But how does one use it?
I am implementing a dynamic rollout model for video and would like to roll out the frames inside a tf.while_loop and swap the intermediate frames back to the CPU to reduce memory consumptiom.