Created
October 17, 2020 20:16
-
-
Save MCarlomagno/84cd0510bc77064238684e8d636ac19e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var buildModel = function () { | |
var model = tf.sequential(); | |
model.add(tf.layers.dense({ units: 24, inputShape: [6], activation: 'relu' })); // input shape === state shape | |
model.add(tf.layers.dense({ units: 24, activation: 'relu' })); | |
model.add(tf.layers.dense({ units: 9, activation: 'linear' })); // units === action_size | |
model.compile({ loss: tf.losses.huberLoss, optimizer: tf.train.adam(learningRate) }); | |
return model | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment