Closed drmanhatin closed 3 years ago
Hi,
There's a memory leak in this library. Happens after a few dozens of tensors have been created. I can show you on teams if you like, just send me a message.
My (working) implementation of tensorflowjs is accessible at https://github.com/drmanhatin/CustomVisionRealTime/blob/main/nodejsdemo/public/main.js.
Most important part:
let t4d = tf.tidy(() => { const image = tf.browser.fromPixels(canvas).resizeBilinear([320, 320]) return tf.tensor4d(image.dataSync(), [1, 320, 320, 3]) })
Wrapping with tidy ensures automatic cleanup.
Hello,
Thanks for reporting the issue. I will look into it and make a fix this week.
Fixed the memory leak in f9c6003488ad86c8a5759a66d51e30fa6951cde9
Hi,
There's a memory leak in this library. Happens after a few dozens of tensors have been created. I can show you on teams if you like, just send me a message.
My (working) implementation of tensorflowjs is accessible at https://github.com/drmanhatin/CustomVisionRealTime/blob/main/nodejsdemo/public/main.js.
Most important part:
Wrapping with tidy ensures automatic cleanup.