Skip to content

Instantly share code, notes, and snippets.

@caisq
Created September 5, 2018 18:53
Show Gist options
  • Save caisq/fc8419c7a867bbc759d07b67169e7d35 to your computer and use it in GitHub Desktop.
Save caisq/fc8419c7a867bbc759d07b67169e7d35 to your computer and use it in GitHub Desktop.
TFJS-node ProgbarCallback
// To see the callback live, uncomment the following lines for and try the
// code out with ts-node.
// (async function() {
// const model = tfl.sequential({layers: [
// tfl.layers.dense({units: 100, inputShape: [20], activation: 'relu'}),
// tfl.layers.dense({units: 1})
// ]});
// model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});
// const xs = tfc.ones([500, 20]);
// const ys = tfc.zeros([500, 1]);
// await model.fit(xs, ys,{
// batchSize: 16,
// epochs: 5,
// validationSplit: 0.15,
// callbacks: tfn.progbarLogger()
// });
// })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment