I'm trying to do a bit of manual memory management and am unsure how to move a tensor onto the CPU once an operation is complete. For my use case, I'd like to run an STFT on the GPU and then immediately move the tensor onto the CPU because it takes up a huge amount of memory. Something like.
with tf.device("GPU:0"):
foo = tf.signal.stft(bar, ...)
with tf.device("CPU:0"):
baz = foo
del foo