Created
March 31, 2020 14:24
-
-
Save Rishit-dagli/ff41bc13df6a90128baf25dc56be089c to your computer and use it in GitHub Desktop.
Simple model with TF.js
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
function createModel() { | |
// Create a sequential model | |
const model = tf.sequential(); | |
// Add a single input layer | |
model.add(tf.layers.dense({inputShape: [1], units: 1, useBias: true})); | |
// Add an output layer | |
model.add(tf.layers.dense({units: 1, useBias: true})); | |
return model; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment