Skip to content

Commit

Permalink
speed up and memory leak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
splis committed Feb 3, 2024
1 parent d2e016e commit 5a74313
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/brainchop/mainMeshNetFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4151,6 +4151,7 @@ class SequentialConvLayer {
// Important to avoid "undefined" class var members inside the timer.
// "this" has another meaning inside the timer.

// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
//document.getElementById("progressBarChild").parentElement.style.visibility = "visible";

return new Promise((resolve, reject) => {
Expand Down Expand Up @@ -4208,14 +4209,16 @@ class SequentialConvLayer {
if(chIdx == (self.outChannels -1)) {

window.clearInterval( seqTimer );
//document.getElementById("progressBarChild").style.width = 0 + "%";
// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
// document.getElementById("progressBarChild").style.width = 0 + "%";
tf.dispose(outB);
const endTime = performance.now();
const executionTime = endTime - startTime;
console.log(`Execution time for output layer: ${executionTime} milliseconds`);
resolve(outC);
}
chIdx++;
// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
//document.getElementById("progressBarChild").style.width = (chIdx + 1)*100/self.outChannels + "%";
}, 10);
});
Expand Down

0 comments on commit 5a74313

Please sign in to comment.