Mark Strefford
unread,Jan 15, 2021, 5:08:28 AM1/15/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TensorFlow.js Discussion, Na Li, TensorFlow.js Discussion, Ann Yuan, eunmi...@gmail.com, Ping Yu
I've found that tf.dispose() doesn't remove all tensors created by tf.js, it seems there are intermediary tensors created during many tfjs calls. I now wrap any tf.js code in tf.tidy(). It's worth a try, although to be fair this doesn't explain why your tf.memory values don't change.
Also, as an aside, I notice you create buffers on each pass through your detection loop. It could be that these aren't being cleared up properly, so perhaps create the buffer once and reuse it each time. I don't know how efficient Javascript's memory deallocation processes are.