Skip to content

Instantly share code, notes, and snippets.

@Marina-Miranovich
Created November 14, 2018 20:46
Show Gist options
  • Save Marina-Miranovich/a078dcc36a2b8df6ca086ad9a427d24b to your computer and use it in GitHub Desktop.
Save Marina-Miranovich/a078dcc36a2b8df6ca086ad9a427d24b to your computer and use it in GitHub Desktop.
code_snippet_6 for "Playing Mortal Kombat with TensorFlow.js. Transfer learning and data augmentation" translation
await model.fit(xs, ys, {
epochs: Epochs,
batchSize: parseInt(((punches.length + others.length) * BatchSize).toFixed(0)),
callbacks: {
onBatchEnd: async (_, logs) => {
console.log('Cost: %s, accuracy: %s', logs.loss.toFixed(5), logs.acc.toFixed(5));
await tf.nextFrame();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment