Memory management. #231
lambdacerro
started this conversation in
General
Replies: 2 comments
-
can you open an issue for this and post a link to full reproduction as i cannot detect any tensor leaks? i just tried with const human = new Human();
await human.load();
await human.warmup();
const buffer = fs.readFileSync(inputFile);
console.log(human.tf.engine().memory().numTensors);
let tensor;
for (let i = 0; i < 100; i++) {
tensor = human.tf.node.decodeImage(buffer);
await human.detect(tensor);
human.tf.dispose(tensor);
}
console.log(human.tf.engine().memory().numTensors); |
Beta Was this translation helpful? Give feedback.
0 replies
-
(resolved via issue #232) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I've started currently using Human for a project and so far is an awesome library :)
However i'm having an issue when dealing with memory leaks.
I can't get my app to stop leaking tensors even after disposing them, right now im doing it like this.
However after every call some tensors are left behind and after some time the kernel kills the app due to high memory usage.
If I remove the detect call, the tensor count stays stable.
I dont know if there's something else I should do in order to avoid leaking tensors.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions