Skip to content

Instantly share code, notes, and snippets.

@nhammad
Created July 30, 2021 22:10
Show Gist options
  • Save nhammad/da0e0ca479c1b88844840ec675cf97dd to your computer and use it in GitHub Desktop.
Save nhammad/da0e0ca479c1b88844840ec675cf97dd to your computer and use it in GitHub Desktop.
function train() {
classifier.current.train((lossValue: number ) => {
console.log("Loss is", lossValue);
if (lossValue) {
setLossValue(lossValue)
}
if (lossValue == null) {
setTrainingComplete(true);
console.log("training complete");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment