Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy committed Dec 20, 2023
1 parent a81bcaa commit 77282f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const predict = async (sentences) => {
const results = await resultTensors.arraySync();

// Must clean up after tensorflow, since it'll leak memory otherwise
tensors.forEach((tensor) => tf.dispose(tensor));
tensors.forEach((_tensor) => tf.dispose(_tensor));
tf.dispose(resultTensors);
tf.dispose(tensor);

console.log("Current tensors in memory:", tf.memory().numTensors, "Current TF mem bytes:", tf.memory().numBytes);
console.log('Current tensors in memory:', tf.memory().numTensors, 'Current TF mem bytes:', tf.memory().numBytes);

return results;
};
Expand Down

0 comments on commit 77282f3

Please sign in to comment.