Created
November 14, 2018 20:46
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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