while_loop swap_memory usage

18 views
Skip to first unread message

Alan Patterson

unread,
Sep 28, 2022, 11:45:39 AMSep 28
to Discuss
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.


Reply all
Reply to author
Forward
0 new messages