Created
November 14, 2018 21:04
-
-
Save Marina-Miranovich/1b20bc6a1fa1876cbdc524c1ad6a6915 to your computer and use it in GitHub Desktop.
code_snippet_12 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
const model = tf.sequential(); | |
model.add(tf.layers.inputLayer({ inputShape: [1024] })); | |
model.add(tf.layers.dense({ units: 1024, activation: 'relu' })); | |
model.add(tf.layers.dense({ units: 3, activation: 'softmax' })); | |
await model.compile({ | |
optimizer: tf.train.adam(1e-6), | |
loss: tf.losses.sigmoidCrossEntropy, | |
metrics: ['accuracy'] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment