Closed jmschrack closed 1 year ago
@jmschrack Why do you think there is memory leak? I did a quick check using tf.memory()
and the usage statistics stay the same across time.
I guess tf.tidy
does pick up the garbage left over from engine().runKernel
, whereas runWebGLProgram
(used in other kernels) doesn't.
Hmm.... it's been a too long for me to remember exactly. But I can't recreate the memory leak either. I'll close it for now, but i'll leave this branch up in my fork in case we need to revisit it.
Added
disposeIntermediateTensorInfo
to BuildExtremas and ComputeLocalization kernels.BuildExtremas is a bit odd, but I think what is happening is that
tidy()
is catching the originalimage0
andimage2
tensor references. And not the ones we overwrite them with since this occurs inside of a kernel function.