model.fit(xxx, yyy, {
batchSize: batchsize,
epochs: epochs,
callbacks: {
onEpochEnd: async (epoch, logs) => {
mycb(epochs, logs);
},
}
})
try {
model.fit(xxx, yyy, {
batchSize: batchsize,
epochs: epochs,
callbacks: {
onEpochEnd: async (epoch, logs) => {
if (should_stop) {
should_stop = false;
$("#gobutton").html("Train");
throw "that is it";
}
mycb(epoch, logs);
// Await web page DOM to refresh for the most recently plotted values.
await tf.nextFrame();
},
}
}).then(() => {
$("#gobutton").html("Train");
console.log("done ....");
});
} catch (err) {
console.log("Error caught:",err.message) // this is not executed when the exception is thrown
}uncaught exception: that is itthis.model.model.stopTraining=true;
this.model.stopTraining=true
--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/3c68f929-5c52-45c2-a7d2-a13cb346a8aa%40tensorflow.org.